Skip to content

Commit 08a3935

Browse files
committed
Fix warnings
``` ▹ tests.cpyext.test_modsupport ↳ TestCase.runClass.<locals>.ThisTestCase.setUpClass /Users/lewurm/work/graalpython/mxbuild/jdk17/com.oracle.graal.python.test/bin/tests/cpyext/parseargs_es.c:14:24: warning: pas sing 'const char *' to parameter of type 'void *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers] PyMem_Free(out); ^~~ /Users/lewurm/work/graalpython/graalpython/include/pymem.h:59:35: note: passing argument to parameter 'ptr' here PyAPI_FUNC(void) PyMem_Free(void *ptr); ^ 1 warning generated. /Users/lewurm/work/graalpython/mxbuild/jdk17/com.oracle.graal.python.test/bin/tests/cpyext/parseargs_et.c:14:24: warning: passing 'const char *' to parameter of type 'void *' discards qual ifiers [-Wincompatible-pointer-types-discards-qualifiers] PyMem_Free(out); ^~~ /Users/lewurm/work/graalpython/graalpython/include/pymem.h:59:35: note: passing argument to parameter 'ptr' here PyAPI_FUNC(void) PyMem_Free(void *ptr); ^ 1 warning generated. ```
1 parent ce8c8bd commit 08a3935

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

graalpython/com.oracle.graal.python.test/src/tests/cpyext/test_modsupport.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ def compile_module(self, name):
537537
),
538538
code='''
539539
static PyObject * wrap_PyArg_ParseTuple(PyObject* argTuple) {
540-
const char * out;
540+
char * out;
541541
Py_INCREF(argTuple);
542542
if (PyArg_ParseTuple(argTuple, "es", "UTF-8", &out) == 0) {
543543
return NULL;
@@ -562,7 +562,7 @@ def compile_module(self, name):
562562
),
563563
code='''
564564
static PyObject * wrap_PyArg_ParseTuple(PyObject* argTuple) {
565-
const char * out;
565+
char * out;
566566
Py_INCREF(argTuple);
567567
if (PyArg_ParseTuple(argTuple, "es", "UTF-8", &out) == 0) {
568568
return NULL;

0 commit comments

Comments
 (0)