From: Ruben Kerkhof Date: Sun, 3 Jun 2018 22:25:33 +0000 (+0200) Subject: processes plugin: const correctness X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=c48faeb6823887e4d31fdcf1940c17dfc29ea70c;p=collectd.git processes plugin: const correctness src/processes.c: In function ‘ps_submit_proc_list’: src/processes.c:915:8: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] {"delay-cpu", ps->delay_cpu}, ^~~~~~~~~~~ src/processes.c:916:8: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] {"delay-blkio", ps->delay_blkio}, ^~~~~~~~~~~~~ src/processes.c:917:8: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] {"delay-swapin", ps->delay_swapin}, ^~~~~~~~~~~~~~ src/processes.c:918:8: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] {"delay-freepages", ps->delay_freepages}, ^~~~~~~~~~~~~~~~~ --- diff --git a/src/processes.c b/src/processes.c index ffe6c5aa..86e99c3a 100644 --- a/src/processes.c +++ b/src/processes.c @@ -909,7 +909,7 @@ static void ps_submit_proc_list(procstat_t *ps) { gauge_t const delay_factor = 1000000000.0; struct { - char *type_instance; + const char *type_instance; gauge_t rate_ns; } delay_metrics[] = { {"delay-cpu", ps->delay_cpu},