From: Florian Forster Date: Tue, 8 Dec 2009 11:25:03 +0000 (+0100) Subject: python plugin: Try to avoid casting errors with Sun's cc. X-Git-Tag: collectd-4.9.0~32^2 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=1a991a476428fa1d72c8658b2dc74efea9b622fd;p=collectd.git python plugin: Try to avoid casting errors with Sun's cc. "python.c", line 534: warning: argument #1 is incompatible with prototype: prototype: pointer to void : "python.c", line 470 argument : pointer to function(pointer to const char, pointer to function(..) returning void, pointer to struct user_data_s {pointer to void data, pointer to function(..) returning void free_func}) returning int "python.c", line 534: warning: argument #2 is incompatible with prototype: prototype: pointer to void : "python.c", line 470 argument : pointer to function(int, pointer to const char, pointer to struct user_data_s {pointer to void data, pointer to function(..) returning void free_func}) returning void --- diff --git a/src/python.c b/src/python.c index 8491649b..006aecf6 100644 --- a/src/python.c +++ b/src/python.c @@ -531,19 +531,23 @@ static PyObject *cpy_register_read(PyObject *self, PyObject *args, PyObject *kwd } static PyObject *cpy_register_log(PyObject *self, PyObject *args, PyObject *kwds) { - return cpy_register_generic_userdata(plugin_register_log, cpy_log_callback, args, kwds); + return cpy_register_generic_userdata((void *) plugin_register_log, + (void *) cpy_log_callback, args, kwds); } static PyObject *cpy_register_write(PyObject *self, PyObject *args, PyObject *kwds) { - return cpy_register_generic_userdata(plugin_register_write, cpy_write_callback, args, kwds); + return cpy_register_generic_userdata((void *) plugin_register_write, + (void *) cpy_write_callback, args, kwds); } static PyObject *cpy_register_notification(PyObject *self, PyObject *args, PyObject *kwds) { - return cpy_register_generic_userdata(plugin_register_notification, cpy_notification_callback, args, kwds); + return cpy_register_generic_userdata((void *) plugin_register_notification, + (void *) cpy_notification_callback, args, kwds); } static PyObject *cpy_register_flush(PyObject *self, PyObject *args, PyObject *kwds) { - return cpy_register_generic_userdata(plugin_register_flush, cpy_flush_callback, args, kwds); + return cpy_register_generic_userdata((void *) plugin_register_flush, + (void *) cpy_flush_callback, args, kwds); } static PyObject *cpy_register_shutdown(PyObject *self, PyObject *args, PyObject *kwds) {