aboutsummaryrefslogtreecommitdiffstats
path: root/res/res_config_pgsql.c
diff options
context:
space:
mode:
authoroej <oej@f38db490-d61c-443f-a65b-d21fe96a405b>2006-04-06 06:55:38 +0000
committeroej <oej@f38db490-d61c-443f-a65b-d21fe96a405b>2006-04-06 06:55:38 +0000
commit6f3da594d1084fc6922a46e3939ff5b601f76f39 (patch)
tree6ed22fe33ebb7cfefe05df77c581903ecccd6ca1 /res/res_config_pgsql.c
parentb2518377e01c6eebca45770cbbecf937b7c3ed70 (diff)
Issue #6893 - Compiler warnings for PostgreSQL ARA driver
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17740 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_config_pgsql.c')
-rw-r--r--res/res_config_pgsql.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/res/res_config_pgsql.c b/res/res_config_pgsql.c
index 4ef55b295..654777949 100644
--- a/res/res_config_pgsql.c
+++ b/res/res_config_pgsql.c
@@ -58,8 +58,6 @@ static int parse_config(void);
static int pgsql_reconnect(const char *database);
static int realtime_pgsql_status(int fd, int argc, char **argv);
-STANDARD_LOCAL_USER;
-
LOCAL_USER_DECL;
static char cli_realtime_pgsql_status_usage[] =
@@ -428,13 +426,10 @@ static struct ast_config *config_pgsql(const char *database, const char *table,
{
PGresult *result = NULL;
long num_rows;
- struct ast_config *new;
- struct ast_variable *cur_v, *new_v;
- struct ast_category *cur_cat, *new_cat;
+ struct ast_variable *new_v;
+ struct ast_category *cur_cat = NULL;
char sql[250] = "";
char last[80] = "";
- int cat_started = 0;
- int var_started = 0;
int last_cat_metric = 0;
last[0] = '\0';
@@ -483,7 +478,7 @@ static struct ast_config *config_pgsql(const char *database, const char *table,
int rowIndex=0;
char** fieldnames=NULL;
- ast_log(LOG_DEBUG, "Postgresql RealTime: Found %d rows.\n", num_rows);
+ ast_log(LOG_DEBUG, "Postgresql RealTime: Found %ld rows.\n", num_rows);
fieldnames=malloc(numFields*sizeof(char*));
if (!fieldnames) {