null+****@clear*****
null+****@clear*****
Fri Aug 10 17:52:34 JST 2012
Kouhei Sutou 2012-08-10 17:52:34 +0900 (Fri, 10 Aug 2012) New Revision: fb385fd4551090be28ff8b9e9f2700565f86e7c6 https://github.com/groonga/groonga/commit/fb385fd4551090be28ff8b9e9f2700565f86e7c6 Log: clang: suppress warnings db.c:3220:47: warning: variable 'key' 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:3171:12: note: initialize the variable 'key' to silence this warning void *key, *value1, *value2; ^ = NULL ---- db.c:3221:24: warning: variable 'value2' is uninitialized when used here [-Wuninitialized] memcpy(value1, value2, value_size); ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~ ../include/groonga.h:1035:72: note: expanded from macro 'GRN_TABLE_EACH' GRN_DAT_EACH((ctx), (grn_dat *)(table), (id), (key), (key_size), block);\ ^ ../include/groonga.h:2876:9: note: expanded from macro 'GRN_DAT_EACH' block\ ^~~~~ db.c:3171:37: note: initialize the variable 'value2' to silence this warning void *key = NULL, *value1, *value2; ^ = NULL Modified files: lib/db.c Modified: lib/db.c (+1 -1) =================================================================== --- lib/db.c 2012-08-10 17:48:40 +0900 (f32d224) +++ lib/db.c 2012-08-10 17:52:34 +0900 (2c884fc) @@ -3168,7 +3168,7 @@ grn_table_setoperation(grn_ctx *ctx, grn_obj *table1, grn_obj *table2, grn_obj * grn_operator op) { grn_rc rc = GRN_SUCCESS; - void *key, *value1, *value2; + void *key = NULL, *value1 = NULL, *value2 = NULL; uint32_t value_size = 0; uint32_t key_size; if (table1 != res) { -------------- next part -------------- HTML����������������������������...Download