Navigation Menu

Skip to content

Commit

Permalink
clang: suppress a warning
Browse files Browse the repository at this point in the history
db.c:3220:52: warning: variable 'key_size' is uninitialized when used here
      [-Wuninitialized]
      if (grn_table_add_v_inline(ctx, table1, key, key_size, &value1, NULL)) {
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
../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:3173:20: note: initialize the variable 'key_size' to silence this warning
  uint32_t key_size;
                   ^
                    = 0
  • Loading branch information
kou committed Aug 10, 2012
1 parent fb385fd commit 2873a4c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/db.c
Expand Up @@ -3170,7 +3170,7 @@ grn_table_setoperation(grn_ctx *ctx, grn_obj *table1, grn_obj *table2, grn_obj *
grn_rc rc = GRN_SUCCESS;
void *key = NULL, *value1 = NULL, *value2 = NULL;
uint32_t value_size = 0;
uint32_t key_size;
uint32_t key_size = 0;
if (table1 != res) {
if (table2 == res) {
grn_obj *t = table1;
Expand Down

0 comments on commit 2873a4c

Please sign in to comment.