From 6ab19698c76f14696e606c5b1de22190d00ca903 Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Fri, 2 Dec 2016 14:53:40 +0100 Subject: [PATCH] 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 ^~~~~~~~~~~~~~~~~~~~~~ --- src/battery_statefs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 -- 2.30.2