summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 27cd1bf)
raw | patch | inline | side by side (parent: 27cd1bf)
author | Bruno Prémont <bonbons@linux-vserver.org> | |
Fri, 18 Mar 2011 07:24:40 +0000 (08:24 +0100) | ||
committer | Florian Forster <octo@huhu.verplant.org> | |
Fri, 18 Mar 2011 08:23:02 +0000 (09:23 +0100) |
Compiling collectd-4.10.2 on an OpenSuSE 11.3 system causes the
following error:
snmp.c: In function ‘module_register’:
snmp.c:1620:3: error: passing argument 1 of ‘plugin_register_shutdown’ discards qualifiers from pointer target type
plugin.h:275:5: note: expected ‘char *’ but argument is of type ‘const char *’
Convert plugin_register_shutdown's name argument from 'char *' to
'const char *' in order to match the other plugin_register_*
functions.
Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
following error:
snmp.c: In function ‘module_register’:
snmp.c:1620:3: error: passing argument 1 of ‘plugin_register_shutdown’ discards qualifiers from pointer target type
plugin.h:275:5: note: expected ‘char *’ but argument is of type ‘const char *’
Convert plugin_register_shutdown's name argument from 'char *' to
'const char *' in order to match the other plugin_register_*
functions.
Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
src/plugin.c | patch | blob | history | |
src/plugin.h | patch | blob | history |
diff --git a/src/plugin.c b/src/plugin.c
index 492be214a727d36ac6cc9f059199382650628e6b..d5f83c5582f9a8edaab263d62e6c8b9d2720426a 100644 (file)
--- a/src/plugin.c
+++ b/src/plugin.c
(void *) callback, ud));
} /* int plugin_register_flush */
-int plugin_register_shutdown (char *name,
+int plugin_register_shutdown (const char *name,
int (*callback) (void))
{
return (create_register_callback (&list_shutdown, name,
diff --git a/src/plugin.h b/src/plugin.h
index 868f44aba41d81f46fd384de7805ffa92f1a09fe..06f023e9d960071438cea13cadea6658118a53c5 100644 (file)
--- a/src/plugin.h
+++ b/src/plugin.h
plugin_write_cb callback, user_data_t *user_data);
int plugin_register_flush (const char *name,
plugin_flush_cb callback, user_data_t *user_data);
-int plugin_register_shutdown (char *name,
+int plugin_register_shutdown (const char *name,
plugin_shutdown_cb callback);
int plugin_register_data_set (const data_set_t *ds);
int plugin_register_log (const char *name,