Commit 2c079297 authored by Georg Brandl's avatar Georg Brandl

Fix warnings GCC emits where the argument of PyErr_Format is a single variable.

parent cbb4958c
...@@ -599,13 +599,14 @@ CDataType_in_dll(PyObject *type, PyObject *args) ...@@ -599,13 +599,14 @@ CDataType_in_dll(PyObject *type, PyObject *args)
#else #else
address = (void *)ctypes_dlsym(handle, name); address = (void *)ctypes_dlsym(handle, name);
if (!address) { if (!address) {
PyErr_Format(PyExc_ValueError,
#ifdef __CYGWIN__ #ifdef __CYGWIN__
/* dlerror() isn't very helpful on cygwin */ /* dlerror() isn't very helpful on cygwin */
PyErr_Format(PyExc_ValueError,
"symbol '%s' not found (%s) ", "symbol '%s' not found (%s) ",
name, name);
#else
PyErr_SetString(PyExc_ValueError, ctypes_dlerror());
#endif #endif
ctypes_dlerror());
return NULL; return NULL;
} }
#endif #endif
...@@ -3283,13 +3284,14 @@ CFuncPtr_FromDll(PyTypeObject *type, PyObject *args, PyObject *kwds) ...@@ -3283,13 +3284,14 @@ CFuncPtr_FromDll(PyTypeObject *type, PyObject *args, PyObject *kwds)
#else #else
address = (PPROC)ctypes_dlsym(handle, name); address = (PPROC)ctypes_dlsym(handle, name);
if (!address) { if (!address) {
PyErr_Format(PyExc_AttributeError,
#ifdef __CYGWIN__ #ifdef __CYGWIN__
/* dlerror() isn't very helpful on cygwin */ /* dlerror() isn't very helpful on cygwin */
PyErr_Format(PyExc_AttributeError,
"function '%s' not found (%s) ", "function '%s' not found (%s) ",
name, name);
#else
PyErr_SetString(PyExc_AttributeError, ctypes_dlerror());
#endif #endif
ctypes_dlerror());
return NULL; return NULL;
} }
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment