From: Ruben Kerkhof Date: Fri, 2 Dec 2016 13:53:40 +0000 (+0100) Subject: battery_statefs: fix a few build warnings X-Git-Tag: collectd-5.8.0~293 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=6ab19698c76f14696e606c5b1de22190d00ca903;p=collectd.git battery_statefs: fix a few build warnings battery_statefs.c:95:8: warning: initializing 'char *' with an expression of type 'const char [38]' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers] {STATEFS_ROOT "Current", "current", NULL, 1e-6}, // from uA to A ^~~~~~~~~~~~~~~~~~~~~~ --- diff --git a/src/battery_statefs.c b/src/battery_statefs.c index 4b9baf42..4f6a8c15 100644 --- a/src/battery_statefs.c +++ b/src/battery_statefs.c @@ -87,9 +87,9 @@ int battery_read_statefs(void) { } struct { - char *path; - char *type; - char *type_instance; + const char *path; + const char *type; + const char *type_instance; gauge_t factor; } metrics[] = { {STATEFS_ROOT "Current", "current", NULL, 1e-6}, // from uA to A