From: Ruben Kerkhof Date: Tue, 9 Aug 2016 11:51:02 +0000 (+0200) Subject: utils_db_query.c: fix compiler warning X-Git-Tag: collectd-5.6.0~71 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=7491350ab6771e9125284b49e25945063dc16ead;p=collectd.git utils_db_query.c: fix compiler warning utils_db_query.c: In function ‘udb_result_submit’: utils_db_query.c:259:11: warning: declaration of ‘status’ shadows a previous local [-Wshadow] int status = strjoin (vl.type_instance, sizeof (vl.type_instance), ^~~~~~ --- diff --git a/src/utils_db_query.c b/src/utils_db_query.c index 8eae6b8c..c8019845 100644 --- a/src/utils_db_query.c +++ b/src/utils_db_query.c @@ -199,7 +199,6 @@ static int udb_result_submit (udb_result_t *r, /* {{{ */ udb_query_t const *q, udb_query_preparation_area_t *q_area) { value_list_t vl = VALUE_LIST_INIT; - int status; assert (r != NULL); assert (r_area->ds != NULL); @@ -298,7 +297,7 @@ static int udb_result_submit (udb_result_t *r, /* {{{ */ for (size_t i = 0; i < r->metadata_num; i++) { - status = meta_data_add_string (vl.meta, r->metadata[i], + int status = meta_data_add_string (vl.meta, r->metadata[i], r_area->metadata_buffer[i]); if (status != 0) {