aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2011-04-11 15:36:48 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:15:20 -0300
commite6a322e777ab36bbed430a8836e0f656de49963d (patch)
tree661613b8c36aee63a76023ab6d503ccdfa66b695
parent001a416ffbc4808e2ba8a1c76d335eb504339673 (diff)
Remove GCC 4.6 warning on basewrapper.cpp and shibokengenerator.cpp
libshiboken/basewrapper.cpp:212:57: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] generator/shibokengenerator.cpp:1118:9: warning: variable ‘numArgs’ set but not used [-Wunused-but-set-variable]
-rw-r--r--generator/shibokengenerator.cpp2
-rw-r--r--libshiboken/basewrapper.cpp4
2 files changed, 2 insertions, 4 deletions
diff --git a/generator/shibokengenerator.cpp b/generator/shibokengenerator.cpp
index da48a8519..9546da775 100644
--- a/generator/shibokengenerator.cpp
+++ b/generator/shibokengenerator.cpp
@@ -1114,7 +1114,6 @@ void ShibokenGenerator::writeCodeSnips(QTextStream& s,
// detect is we should use pyargs instead of args as variable name for python arguments
bool usePyArgs = false;
- int numArgs = 0;
if (func) {
// calc num of real arguments.
int argsRemoved = 0;
@@ -1122,7 +1121,6 @@ void ShibokenGenerator::writeCodeSnips(QTextStream& s,
if (func->argumentRemoved(i+1))
argsRemoved++;
}
- numArgs = func->arguments().size() - argsRemoved;
usePyArgs = pythonFunctionWrapperUsesListOfArguments(OverloadData(getFunctionGroups(func->implementingClass())[func->name()], this));
}
diff --git a/libshiboken/basewrapper.cpp b/libshiboken/basewrapper.cpp
index fbf6c215f..6c8c3fb3c 100644
--- a/libshiboken/basewrapper.cpp
+++ b/libshiboken/basewrapper.cpp
@@ -210,9 +210,9 @@ PyObject* SbkObjectTypeTpNew(PyTypeObject* metatype, PyObject* args, PyObject* k
PyObject* name;
PyObject* pyBases;
PyObject* dict;
- static char* kwlist[] = { "name", "bases", "dict", 0};
+ static const char* kwlist[] = { "name", "bases", "dict", 0};
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "SO!O!:sbktype", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "SO!O!:sbktype", (char**)kwlist,
&name,
&PyTuple_Type, &pyBases,
&PyDict_Type, &dict))