Skip to content

Commit

Permalink
db_berkeley: fix compilation warning
Browse files Browse the repository at this point in the history
> km_db_berkeley.c:486:58: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
>                 if ((ret = bdb_get_columns(_tbc->dtp, *_r, lres, _nc)) < 0)
>                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
> km_db_berkeley.c:513:50: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
>                         if ((ret=bdb_append_row( *_r, dbuf, lres, i)) < 0)
>                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
> km_db_berkeley.c:567:58: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
>                 if ((ret = bdb_get_columns(_tbc->dtp, *_r, lres, _nc)) < 0)
>                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
> km_db_berkeley.c:572:47: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
>                 if ((ret=bdb_convert_row( *_r, dbuf, lres)) < 0)
>                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
> 4 warnings generated.

(cherry picked from commit 6e376ee)
  • Loading branch information
linuxmaniac authored and miconda committed Jun 27, 2016
1 parent b051f29 commit de13f20
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/db_berkeley/km_db_berkeley.c
Expand Up @@ -362,9 +362,10 @@ int km_bdb_query(db1_con_t* _con, db_key_t* _k, db_op_t* _op, db_val_t* _v,
table_p _tp = NULL;
char kbuf[MAX_ROW_SIZE];
char dbuf[MAX_ROW_SIZE];
u_int32_t i, len, ret;
u_int32_t i, len;
int klen=MAX_ROW_SIZE;
int *lkey=NULL, *lres=NULL;
int ret;
DBT key, data;
DB *db;
DBC *dbcp;
Expand Down

0 comments on commit de13f20

Please sign in to comment.