Skip to content

Commit

Permalink
db_postgres: remove gcc warnings
Browse files Browse the repository at this point in the history
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]
  • Loading branch information
linuxmaniac committed May 21, 2015
1 parent 7b6aba3 commit 70ad498
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions modules/db_postgres/pg_cmd.c
Expand Up @@ -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]);

Expand Down Expand Up @@ -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) {
Expand All @@ -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;
}

Expand Down

0 comments on commit 70ad498

Please sign in to comment.