Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2156858

Browse files
committed
Fix warnings on gcc 4.2.1
svn path=/trunk/matplotlib/; revision=4891
1 parent e6315e0 commit 2156858

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/_backend_agg.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1300,7 +1300,7 @@ static void write_png_data(png_structp png_ptr, png_bytep data, png_size_t lengt
13001300
PyObject* write_method = PyObject_GetAttrString(py_file_obj, "write");
13011301
PyObject* result = NULL;
13021302
if (write_method)
1303-
result = PyObject_CallFunction(write_method, "s#", data, length);
1303+
result = PyObject_CallFunction(write_method, (char *)"s#", data, length);
13041304
Py_XDECREF(write_method);
13051305
Py_XDECREF(result);
13061306
}
@@ -1310,7 +1310,7 @@ static void flush_png_data(png_structp png_ptr) {
13101310
PyObject* flush_method = PyObject_GetAttrString(py_file_obj, "flush");
13111311
PyObject* result = NULL;
13121312
if (flush_method)
1313-
result = PyObject_CallFunction(flush_method, "");
1313+
result = PyObject_CallFunction(flush_method, (char *)"");
13141314
Py_XDECREF(flush_method);
13151315
Py_XDECREF(result);
13161316
}

src/_image.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ static void write_png_data(png_structp png_ptr, png_bytep data, png_size_t lengt
580580
PyObject* write_method = PyObject_GetAttrString(py_file_obj, "write");
581581
PyObject* result = NULL;
582582
if (write_method)
583-
result = PyObject_CallFunction(write_method, "s#", data, length);
583+
result = PyObject_CallFunction(write_method, (char *)"s#", data, length);
584584
Py_XDECREF(write_method);
585585
Py_XDECREF(result);
586586
}
@@ -590,7 +590,7 @@ static void flush_png_data(png_structp png_ptr) {
590590
PyObject* flush_method = PyObject_GetAttrString(py_file_obj, "flush");
591591
PyObject* result = NULL;
592592
if (flush_method)
593-
result = PyObject_CallFunction(flush_method, "");
593+
result = PyObject_CallFunction(flush_method, (char *)"");
594594
Py_XDECREF(flush_method);
595595
Py_XDECREF(result);
596596
}

0 commit comments

Comments
 (0)