Avoid a warning during compilation
This commit is contained in:
parent
35209f0eae
commit
ef2065e6f0
|
@ -235,7 +235,9 @@ static int _pgsql_prepare_query(PgSQL * pgsql, PgSQLStatement * statement,
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
size_t cnt;
|
size_t cnt;
|
||||||
int type;
|
int type;
|
||||||
|
#ifdef DEBUG
|
||||||
char const * name;
|
char const * name;
|
||||||
|
#endif
|
||||||
int l;
|
int l;
|
||||||
char buf[32];
|
char buf[32];
|
||||||
time_t t;
|
time_t t;
|
||||||
|
@ -249,7 +251,11 @@ static int _pgsql_prepare_query(PgSQL * pgsql, PgSQLStatement * statement,
|
||||||
/* FIXME this assumes the same order as in the prepared statement */
|
/* FIXME this assumes the same order as in the prepared statement */
|
||||||
for(cnt = 0; ret == 0 && (type = va_arg(args, int)) != -1; cnt++)
|
for(cnt = 0; ret == 0 && (type = va_arg(args, int)) != -1; cnt++)
|
||||||
{
|
{
|
||||||
|
#ifdef DEBUG
|
||||||
name = va_arg(args, char const *);
|
name = va_arg(args, char const *);
|
||||||
|
#else
|
||||||
|
va_arg(args, char const *);
|
||||||
|
#endif
|
||||||
if((p = realloc(v, sizeof(*v) * (cnt + 1))) == NULL)
|
if((p = realloc(v, sizeof(*v) * (cnt + 1))) == NULL)
|
||||||
{
|
{
|
||||||
ret = -error_set_code(1, "%s", strerror(errno));
|
ret = -error_set_code(1, "%s", strerror(errno));
|
||||||
|
|
Loading…
Reference in New Issue
Block a user