Enabled GCC -Wwrite-strings warning for CMake and replaced many 'char's for 'const char's,.

Only one functional change where Transform orientations passed "" to BIF_createTransformOrientation() which could then have the value written into.
This commit is contained in:
2010-12-03 17:05:21 +00:00
parent 7c86a1a95c
commit 263830f000
157 changed files with 959 additions and 952 deletions

View File

@@ -24,7 +24,7 @@
#include "py_capi_utils.h"
/* for debugging */
void PyC_ObSpit(char *name, PyObject *var) {
void PyC_ObSpit(const char *name, PyObject *var) {
fprintf(stderr, "<%s> : ", name);
if (var==NULL) {
fprintf(stderr, "<NIL>");
@@ -171,7 +171,7 @@ PyObject *PyC_ExceptionBuffer(void)
if(! (string_io_mod= PyImport_ImportModule("io")) ) {
goto error_cleanup;
} else if (! (string_io = PyObject_CallMethod(string_io_mod, "StringIO", NULL))) {
} else if (! (string_io = PyObject_CallMethod(string_io_mod, (char *)"StringIO", NULL))) {
goto error_cleanup;
} else if (! (string_io_getvalue= PyObject_GetAttrString(string_io, "getvalue"))) {
goto error_cleanup;
@@ -323,12 +323,12 @@ void PyC_RunQuicky(const char *filepath, int n, ...)
char *format = va_arg(vargs, char *);
void *ptr = va_arg(vargs, void *);
ret= PyObject_CallFunction(calcsize, "s", format);
ret= PyObject_CallFunction(calcsize, (char *)"s", format);
if(ret) {
sizes[i]= PyLong_AsSsize_t(ret);
Py_DECREF(ret);
ret = PyObject_CallFunction(unpack, "sy#", format, (char *)ptr, sizes[i]);
ret = PyObject_CallFunction(unpack, (char *)"sy#", format, (char *)ptr, sizes[i]);
}
if(ret == NULL) {