Navigation Menu

Skip to content

Commit

Permalink
clang: suppress a warning
Browse files Browse the repository at this point in the history
db.c:3260:45: warning: variable 'key' is uninitialized when used here
      [-Wuninitialized]
      if ((id1 = grn_table_get(ctx, table1, key, key_size))) {
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
../include/groonga.h:1041:82: note: expanded from macro 'GRN_TABLE_EACH'
  ...(grn_array *)(table), (head), (tail), (id), (value), block);\
                                                          ^
../include/groonga.h:2734:7: note: expanded from macro 'GRN_ARRAY_EACH'
      block\
      ^~~~~
db.c:3254:12: note: initialize the variable 'key' to silence this warning
  void *key;
           ^
            = NULL
  • Loading branch information
kou committed Aug 10, 2012
1 parent 59c3ec4 commit 97cc4d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/db.c
Expand Up @@ -3251,7 +3251,7 @@ grn_rc
grn_table_difference(grn_ctx *ctx, grn_obj *table1, grn_obj *table2,
grn_obj *res1, grn_obj *res2)
{
void *key;
void *key = NULL;
uint32_t key_size = 0;
if (table1 != res1 || table2 != res2) { return GRN_INVALID_ARGUMENT; }
if (grn_table_size(ctx, table1) > grn_table_size(ctx, table2)) {
Expand Down

0 comments on commit 97cc4d9

Please sign in to comment.