Commit 016162b0 authored by David Gobbi's avatar David Gobbi

COMP: fix signed/unsigned mismatch warnings

parent 97eb9cf9
......@@ -155,8 +155,8 @@ public:
void initialize(bool selfIsClass, const char *format);
bool next(const char **format, const char **classname);
int penalty() { return m_penalty; };
int penalty(int penalty) {
if (penalty > m_penalty) { m_penalty = penalty; };
int penalty(int p) {
if (p > m_penalty) { m_penalty = p; };
return m_penalty; };
private:
......@@ -233,6 +233,8 @@ int vtkPythonIntPenalty(PY_LONG_LONG tmpi, int penalty, char format)
int vtkPythonIntPenalty(long tmpi, int penalty, char format)
#endif
{
tmpi; format; // avoid "unused parameter" compiler warnings
#if VTK_SIZEOF_LONG != VTK_SIZEOF_INT
if (tmpi > VTK_INT_MAX || tmpi < VTK_INT_MIN)
{
......@@ -573,10 +575,10 @@ int vtkPythonUtil::CheckArg(
penalty = VTK_PYTHON_NEEDS_CONVERSION;
// Look up the required type in the map
vtkPythonSpecialTypeMap::iterator i;
vtkPythonSpecialTypeMap::iterator iter;
if (level != 0 ||
(i = vtkPythonMap->SpecialTypeMap->find(classname)) ==
(iter = vtkPythonMap->SpecialTypeMap->find(classname)) ==
vtkPythonMap->SpecialTypeMap->end())
{
penalty = VTK_PYTHON_INCOMPATIBLE;
......@@ -584,7 +586,7 @@ int vtkPythonUtil::CheckArg(
else
{
// Get info about the required type
PyVTKSpecialType *info = &i->second;
PyVTKSpecialType *info = &iter->second;
// Try out all the constructor methods
if (!vtkPythonUtil::FindConversionMethod(info->constructors, arg))
......@@ -1514,7 +1516,7 @@ int vtkPythonUtil::CheckArray(PyObject *args, int i, bool *a, int n)
for (i = 0; i < n; i++)
{
PyObject *oldobj = PySequence_GetItem(seq, i);
bool oldval = PyObject_IsTrue(oldobj);
bool oldval = (PyObject_IsTrue(oldobj) != 0);
Py_DECREF(oldobj);
changed |= (a[i] != oldval);
}
......
......@@ -43,8 +43,7 @@ static void vtkWrapPython_CustomMethods(
/* print out all methods and the method table */
static void vtkWrapPython_GenerateMethods(
FILE *fp, FileInfo *data, int class_has_new,
int is_vtkobject, int do_constructors);
FILE *fp, FileInfo *data, int is_vtkobject, int do_constructors);
/* make a temporary variable for an arg value or a return value */
static void vtkWrapPython_MakeTempVariable(
......@@ -732,7 +731,7 @@ static void vtkWrapPython_ReturnValue(
static char *vtkWrapPython_FormatString(FunctionInfo *currentFunction)
{
static char result[1024];
int currPos = 0;
size_t currPos = 0;
int argtype;
int i, j;
int typeChar;
......@@ -875,7 +874,7 @@ static char *vtkWrapPython_ArgCheckString(
int isvtkobjmethod, FunctionInfo *currentFunction)
{
static char result[1024];
int currPos = 0;
size_t currPos = 0;
int argtype;
int i;
......@@ -1608,8 +1607,7 @@ void vtkWrapPython_RemovePreceededMethods(
* words, this poorly named function is "the big one". */
static void vtkWrapPython_GenerateMethods(
FILE *fp, FileInfo *data, int class_has_new,
int is_vtkobject, int do_constructors)
FILE *fp, FileInfo *data, int is_vtkobject, int do_constructors)
{
int i, j, k, is_static, is_pure_virtual, fnum, occ;
int numberOfSignatures, signatureCount;
......@@ -3034,7 +3032,7 @@ static void vtkWrapPython_GenerateSpecialObjectNew(
int i;
/* handle all constructors */
vtkWrapPython_GenerateMethods(fp, data, class_has_new, 0, 1);
vtkWrapPython_GenerateMethods(fp, data, 0, 1);
/* the method table for the New method */
fprintf(fp,
......@@ -3316,7 +3314,7 @@ void vtkParseOutput(FILE *fp, FileInfo *data)
/* now output all the methods are wrappable */
if (is_vtkobject || !data->IsAbstract)
{
vtkWrapPython_GenerateMethods(fp, data, class_has_new, is_vtkobject, 0);
vtkWrapPython_GenerateMethods(fp, data, is_vtkobject, 0);
}
/* output the class initilization function for VTK objects */
......
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