Navigation Menu

Skip to content

Commit

Permalink
clang: suppress a warning
Browse files Browse the repository at this point in the history
proc.c:1883:34: warning: variable 'key' is uninitialized when used here
      [-Wuninitialized]
          grn_id id = *(grn_id *)key;
          ~~~~~~~~~~~~~~~~~~~~~~~^~~~
../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\
      ^~~~~
proc.c:1880:18: note: initialize the variable 'key' to silence this warning
        void *key;
                 ^
                  = NULL
  • Loading branch information
kou committed Aug 10, 2012
1 parent 4c23126 commit a5a08a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/proc.c
Expand Up @@ -1877,7 +1877,7 @@ proc_delete(grn_ctx *ctx, int nargs, grn_obj **args, grn_user_data *user_data)

records = grn_table_select(ctx, table, cond, NULL, GRN_OP_OR);
if (records) {
void *key;
void *key = NULL;
GRN_TABLE_EACH(ctx, records, GRN_ID_NIL, GRN_ID_NIL,
result_id, &key, NULL, NULL, {
grn_id id = *(grn_id *)key;
Expand Down

0 comments on commit a5a08a5

Please sign in to comment.