From d6b4d8a4fce28d6c6bc689de582ebff525fa13dc Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Fri, 2 Dec 2016 14:39:25 +0100 Subject: [PATCH] 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. --- src/daemon/meta_data.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.11.0