From: Ruben Kerkhof Date: Fri, 2 Dec 2016 13:39:25 +0000 (+0100) Subject: meta_data.c: fix a build warning X-Git-Tag: collectd-5.8.0~294 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=d6b4d8a4fce28d6c6bc689de582ebff525fa13dc;p=collectd.git meta_data.c: fix a build warning make[3]: Entering directory '/home/ruben/src/collectd/src/daemon' CC meta_data.lo meta_data.c:728:12: warning: assigning to 'char *' from 'const char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers] actual = e->value.mv_boolean ? "true" : "false"; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 warning generated. CCLD libmetadata.la CC collectd-meta_data.o meta_data.c:728:12: warning: assigning to 'char *' from 'const char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers] actual = e->value.mv_boolean ? "true" : "false"; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 warning generated. --- diff --git a/src/daemon/meta_data.c b/src/daemon/meta_data.c index 583d8196..19d17bf8 100644 --- a/src/daemon/meta_data.c +++ b/src/daemon/meta_data.c @@ -690,7 +690,7 @@ int meta_data_get_boolean(meta_data_t *md, /* {{{ */ int meta_data_as_string(meta_data_t *md, /* {{{ */ const char *key, char **value) { meta_entry_t *e; - char *actual; + const char *actual; char buffer[MD_MAX_NONSTRING_CHARS]; /* For non-string types. */ char *temp; int type;