summaryrefslogtreecommitdiffstats
path: root/src/report-python
diff options
context:
space:
mode:
Diffstat (limited to 'src/report-python')
-rw-r--r--src/report-python/Makefile.am2
-rw-r--r--src/report-python/dump_dir.c2
-rw-r--r--src/report-python/reportmodule.c2
-rw-r--r--src/report-python/run_event.c8
4 files changed, 7 insertions, 7 deletions
diff --git a/src/report-python/Makefile.am b/src/report-python/Makefile.am
index a00e2d7b..94dc3abb 100644
--- a/src/report-python/Makefile.am
+++ b/src/report-python/Makefile.am
@@ -23,7 +23,7 @@ _pyreport_la_CPPFLAGS = \
$(GLIB_CFLAGS) \
$(PYTHON_CFLAGS) \
-D_GNU_SOURCE \
- -Wall -Werror
+ -Wall -Wwrite-strings -Werror
_pyreport_la_LDFLAGS = \
-module \
-avoid-version \
diff --git a/src/report-python/dump_dir.c b/src/report-python/dump_dir.c
index c8ff3798..96a96fba 100644
--- a/src/report-python/dump_dir.c
+++ b/src/report-python/dump_dir.c
@@ -193,7 +193,7 @@ static PyMethodDef p_dump_dir_methods[] = {
static PyGetSetDef p_dump_dir_getset[] = {
/* attr_name, getter_func, setter_func, doc_string, void_param */
- { "name", get_name, NULL /*set_name*/ },
+ { (char*) "name", get_name, NULL /*set_name*/ },
{ NULL }
};
diff --git a/src/report-python/reportmodule.c b/src/report-python/reportmodule.c
index 41f0ba29..a684984e 100644
--- a/src/report-python/reportmodule.c
+++ b/src/report-python/reportmodule.c
@@ -61,7 +61,7 @@ init_pyreport(void)
}
/* init the exception object */
- ReportError = PyErr_NewException("_pyreport.error", NULL, NULL);
+ ReportError = PyErr_NewException((char*) "_pyreport.error", NULL, NULL);
Py_INCREF(ReportError);
PyModule_AddObject(m, "error", ReportError);
diff --git a/src/report-python/run_event.c b/src/report-python/run_event.c
index 6131df8e..684c7fc7 100644
--- a/src/report-python/run_event.c
+++ b/src/report-python/run_event.c
@@ -76,7 +76,7 @@ static void p_run_event_state_dealloc(PyObject *pself)
static int post_run_callback(const char *dump_dir_name, void *param)
{
PyObject *obj = (PyObject*)param;
- PyObject *ret = PyObject_CallMethod(obj, "post_run_callback", "(s)", dump_dir_name);
+ PyObject *ret = PyObject_CallMethod(obj, (char*) "post_run_callback", (char*) "(s)", dump_dir_name);
int r = 0;
if (ret)
{
@@ -89,7 +89,7 @@ static int post_run_callback(const char *dump_dir_name, void *param)
static char *logging_callback(char *log_line, void *param)
{
PyObject *obj = (PyObject*)param;
- PyObject *ret = PyObject_CallMethod(obj, "logging_callback", "(s)", log_line);
+ PyObject *ret = PyObject_CallMethod(obj, (char*) "logging_callback", (char*) "(s)", log_line);
Py_XDECREF(ret);
// TODO: handle exceptions: if (PyErr_Occurred()) ...
return log_line; /* signaling to caller that we didnt consume the string */
@@ -200,8 +200,8 @@ static PyMethodDef p_run_event_state_methods[] = {
static PyGetSetDef p_run_event_state_getset[] = {
/* attr_name, getter_func, setter_func, doc_string, void_param */
- { "post_run_callback", get_post_run_callback, set_post_run_callback },
- { "logging_callback" , get_logging_callback , set_logging_callback },
+ { (char*) "post_run_callback", get_post_run_callback, set_post_run_callback },
+ { (char*) "logging_callback" , get_logging_callback , set_logging_callback },
{ NULL }
};