Module: kamailio
Branch: master
Commit: 70ad498b2ccc41db77b14c4c79393548cac8426d
URL:
https://github.com/kamailio/kamailio/commit/70ad498b2ccc41db77b14c4c7939354…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2015-05-21T21:56:50+02:00
db_postgres: remove gcc warnings
pg_cmd.c:183:17: warning: variable âpcmdâ set but not used
[-Wunused-but-set-variable]
pg_cmd.c:372:17: warning: variable âpcmdâ set but not used
[-Wunused-but-set-variable]
pg_cmd.c:396:17: warning: variable âpcmdâ set but not used
[-Wunused-but-set-variable]
---
Modified: modules/db_postgres/pg_cmd.c
---
Diff:
https://github.com/kamailio/kamailio/commit/70ad498b2ccc41db77b14c4c7939354…
Patch:
https://github.com/kamailio/kamailio/commit/70ad498b2ccc41db77b14c4c7939354…
---
diff --git a/modules/db_postgres/pg_cmd.c b/modules/db_postgres/pg_cmd.c
index db7ad66..7267cd3 100644
--- a/modules/db_postgres/pg_cmd.c
+++ b/modules/db_postgres/pg_cmd.c
@@ -180,10 +180,8 @@ static void free_pg_params(struct pg_params* params)
*/
static int check_types(db_cmd_t* cmd)
{
- struct pg_cmd* pcmd;
struct pg_con* pcon;
- pcmd = DB_GET_PAYLOAD(cmd);
/* FIXME: The function should take the connection as one of parameters */
pcon = DB_GET_PAYLOAD(cmd->ctx->con[db_payload_idx]);
@@ -369,11 +367,8 @@ int pg_cmd(db_cmd_t* cmd)
int pg_getopt(db_cmd_t* cmd, char* optname, va_list ap)
{
- struct pg_cmd* pcmd;
long long* id;
- pcmd = (struct pg_cmd*)DB_GET_PAYLOAD(cmd);
-
if (!strcasecmp("last_id", optname)) {
id = va_arg(ap, long long*);
if (id == NULL) {
@@ -393,9 +388,6 @@ int pg_getopt(db_cmd_t* cmd, char* optname, va_list ap)
int pg_setopt(db_cmd_t* cmd, char* optname, va_list ap)
{
- struct pg_cmd* pcmd;
-
- pcmd = (struct pg_cmd*)DB_GET_PAYLOAD(cmd);
return 1;
}