With latest glibc (Fedora Rawhide):
../app/proc-info/main.c: In function 'collectd_resolve_cnt_type':
../app/proc-info/main.c:689:26: warning: initialization discards
'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
689 | char *type_end = strrchr(cnt_name, '_');
| ^~~~~~~
Fixes: 2deb6b5246d7 ("app/procinfo: add collectd format and host id")
Cc: [email protected]
Signed-off-by: David Marchand <[email protected]>
---
app/proc-info/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/proc-info/main.c b/app/proc-info/main.c
index b09c03ab35..5925bbb765 100644
--- a/app/proc-info/main.c
+++ b/app/proc-info/main.c
@@ -686,7 +686,7 @@ nic_stats_clear(uint16_t port_id)
static void collectd_resolve_cnt_type(char *cnt_type, size_t cnt_type_len,
const char *cnt_name) {
- char *type_end = strrchr(cnt_name, '_');
+ const char *type_end = strrchr(cnt_name, '_');
if ((type_end != NULL) &&
(strncmp(cnt_name, "rx_", strlen("rx_")) == 0)) {
--
2.51.1