Commit fc0c7875 authored by hkrishna's avatar hkrishna

warning fixes for visitpy directory

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@23641 18c085ea-50e0-402c-830e-de6fd14e8384
parent 008d70c9
...@@ -206,11 +206,16 @@ main(int argc, char *argv[]) ...@@ -206,11 +206,16 @@ main(int argc, char *argv[])
bool verbose = false, s_found = false; bool verbose = false, s_found = false;
bool pyside = false; bool pyside = false;
bool pyside_gui = false,pyside_viewer = false; bool pyside_gui = false,pyside_viewer = false;
char *runFile = 0, *loadFile = 0, tmpArg[512]; char *runFile = 0, *loadFile = 0;
char **argv2 = new char *[argc]; char **argv2 = new char *[argc];
char **argv_after_s = new char *[argc]; char **argv_after_s = new char *[argc];
int argc2 = 0, argc_after_s = 0; int argc2 = 0, argc_after_s = 0;
char* uifile = 0; char* uifile = 0;
const char* pyuiembedded_str = "-pyuiembedded"; //pass it along to client
#ifdef WIN32
char tmpArg[512];
#endif
#ifdef IGNORE_HUPS #ifdef IGNORE_HUPS
signal(SIGHUP, SIG_IGN); signal(SIGHUP, SIG_IGN);
...@@ -345,19 +350,19 @@ main(int argc, char *argv[]) ...@@ -345,19 +350,19 @@ main(int argc, char *argv[])
{ {
pyside_gui = true; pyside_gui = true;
pyside_viewer = true; pyside_viewer = true;
argv2[argc2++] = "-pyuiembedded"; //pass it along to client argv2[argc2++] = const_cast<char*>(pyuiembedded_str); //pass it along to client
} }
else if(strcmp(argv[i], "-pysideclient") == 0) else if(strcmp(argv[i], "-pysideclient") == 0)
{ {
pyside_gui = true; pyside_gui = true;
argv2[argc2++] = "-pyuiembedded"; //pass it along to client argv2[argc2++] = const_cast<char*>(pyuiembedded_str); //pass it along to client
} }
else if(strcmp(argv[i], "-uifile") == 0) else if(strcmp(argv[i], "-uifile") == 0)
{ {
pyside_gui = true; pyside_gui = true;
uifile = argv[i+1]; uifile = argv[i+1];
++i; ++i;
argv2[argc2++] = "-pyuiembedded"; //pass it along to client argv2[argc2++] = const_cast<char*>(pyuiembedded_str); //pass it along to client
} }
else if(strcmp(argv[i], "-dv") == 0) else if(strcmp(argv[i], "-dv") == 0)
{ {
......
...@@ -1359,7 +1359,7 @@ static std::string log_QueryRPC(ViewerRPC *rpc) ...@@ -1359,7 +1359,7 @@ static std::string log_QueryRPC(ViewerRPC *rpc)
MapNode *t_o = queryParams.GetEntry("time_options"); MapNode *t_o = queryParams.GetEntry("time_options");
stringVector t_o_names; stringVector t_o_names;
t_o->GetEntryNames(t_o_names); t_o->GetEntryNames(t_o_names);
for (size_t j = 0; j < t_o->GetNumEntries(); ++j) for (size_t j = 0; j < (size_t)t_o->GetNumEntries(); ++j)
{ {
if (numPrinted > 0) if (numPrinted > 0)
s += ", "; s += ", ";
......
...@@ -803,7 +803,7 @@ static bool ImageObjectEnableLogging = true; ...@@ -803,7 +803,7 @@ static bool ImageObjectEnableLogging = true;
static void static void
PyImageObject_WriteLog(Subject *subj, void *data) PyImageObject_WriteLog(Subject *subj, void *data)
{ {
AnnotationObject *atts = (AnnotationObject *)subj; AnnotationObject *atts = (AnnotationObject *)subj; (void) atts;
FILE *logFile = (FILE *)data; FILE *logFile = (FILE *)data;
if(!ImageObjectEnableLogging || (logFile == NULL)) if(!ImageObjectEnableLogging || (logFile == NULL))
......
...@@ -802,7 +802,7 @@ static bool LineObjectEnableLogging = true; ...@@ -802,7 +802,7 @@ static bool LineObjectEnableLogging = true;
static void static void
PyLineObject_WriteLog(Subject *subj, void *data) PyLineObject_WriteLog(Subject *subj, void *data)
{ {
AnnotationObject *atts = (AnnotationObject *)subj; AnnotationObject *atts = (AnnotationObject *)subj; (void) atts;
FILE *logFile = (FILE *)data; FILE *logFile = (FILE *)data;
if(!LineObjectEnableLogging || (logFile == NULL)) if(!LineObjectEnableLogging || (logFile == NULL))
......
...@@ -128,7 +128,7 @@ PyDict_To_MapNode(PyObject *obj, MapNode &mn) ...@@ -128,7 +128,7 @@ PyDict_To_MapNode(PyObject *obj, MapNode &mn)
if (!PyDict_Check(obj)) if (!PyDict_Check(obj))
return false; return false;
bool success = true; //bool success = true;
Py_ssize_t pos = 0; Py_ssize_t pos = 0;
PyObject *key = NULL; PyObject *key = NULL;
PyObject *value = NULL; PyObject *value = NULL;
......
...@@ -113,7 +113,7 @@ SILRestriction_Categories(PyObject *self, PyObject *args) ...@@ -113,7 +113,7 @@ SILRestriction_Categories(PyObject *self, PyObject *args)
// Allocate a tuple the with enough entries to hold the Collection name list. // Allocate a tuple the with enough entries to hold the Collection name list.
PyObject *retval = PyTuple_New(mapsOut.size()); PyObject *retval = PyTuple_New(mapsOut.size());
for(int i = 0; i < mapsOut.size(); ++i) for(size_t i = 0; i < mapsOut.size(); ++i)
{ {
int cIndex = mapsOut[i]; int cIndex = mapsOut[i];
avtSILCollection_p collection = silr->GetSILCollection(cIndex); avtSILCollection_p collection = silr->GetSILCollection(cIndex);
...@@ -736,7 +736,7 @@ SILRestriction_Wholes(PyObject *self, PyObject *args) ...@@ -736,7 +736,7 @@ SILRestriction_Wholes(PyObject *self, PyObject *args)
// Allocate a tuple the with enough entries to hold the wholes. // Allocate a tuple the with enough entries to hold the wholes.
PyObject *retval = PyTuple_New(silr->GetWholes().size()); PyObject *retval = PyTuple_New(silr->GetWholes().size());
for(int i = 0; i < silr->GetWholes().size(); ++i) for(size_t i = 0; i < silr->GetWholes().size(); ++i)
{ {
PyObject *dval = PyLong_FromLong((long)silr->GetWholes()[i]); PyObject *dval = PyLong_FromLong((long)silr->GetWholes()[i]);
if(dval == NULL) if(dval == NULL)
......
...@@ -91,7 +91,7 @@ struct Text3DObjectObject ...@@ -91,7 +91,7 @@ struct Text3DObjectObject
// //
// Internal prototypes // Internal prototypes
// //
static PyObject *NewText3DObject(int); static PyObject *NewText3DObject(); ///TODO: check fix for function signature update
std::string std::string
PyText3DObject_ToString(const AnnotationObject *atts, const char *prefix) PyText3DObject_ToString(const AnnotationObject *atts, const char *prefix)
......
...@@ -121,6 +121,7 @@ PyTuple_FromIntVector(const intVector &vec) ...@@ -121,6 +121,7 @@ PyTuple_FromIntVector(const intVector &vec)
return tuple; return tuple;
} }
#if 0
static PyObject * static PyObject *
PyTuple_FromDoubleVector(const doubleVector &vec) PyTuple_FromDoubleVector(const doubleVector &vec)
{ {
...@@ -138,6 +139,7 @@ PyTuple_FromDoubleVector(const doubleVector &vec) ...@@ -138,6 +139,7 @@ PyTuple_FromDoubleVector(const doubleVector &vec)
} }
return tuple; return tuple;
} }
#endif
static PyObject * static PyObject *
PyTuple_FromDoubleArray(const double *vec, int len) PyTuple_FromDoubleArray(const double *vec, int len)
......
This diff is collapsed.
...@@ -68,10 +68,11 @@ IF(VISIT_PARALLEL) ...@@ -68,10 +68,11 @@ IF(VISIT_PARALLEL)
"${MPICOM_PY_SOURCES}" "${MPICOM_PY_SOURCES}"
${MPICOM_SOURCES}) ${MPICOM_SOURCES})
SET_TARGET_PROPERTIES(mpicom PROPERTIES COMPILE_FLAGS "-fno-strict-aliasing")
IF(UNIX) IF(UNIX)
IF(VISIT_PARALLEL_CXXFLAGS) IF(VISIT_PARALLEL_CXXFLAGS)
SET(PAR_COMPILE_FLAGS "") SET(PAR_COMPILE_FLAGS "-fno-strict-aliasing")
FOREACH (X ${VISIT_PARALLEL_CXXFLAGS}) FOREACH (X ${VISIT_PARALLEL_CXXFLAGS})
SET(PAR_COMPILE_FLAGS "${PAR_COMPILE_FLAGS} ${X}") SET(PAR_COMPILE_FLAGS "${PAR_COMPILE_FLAGS} ${X}")
ENDFOREACH (X ${VISIT_PARALLEL_CXXFLAGS}) ENDFOREACH (X ${VISIT_PARALLEL_CXXFLAGS})
......
...@@ -217,7 +217,7 @@ Buffer::Init(int buffer_size) ...@@ -217,7 +217,7 @@ Buffer::Init(int buffer_size)
Reset(); Reset();
// Any buffer size smaller than the header is invalid. // Any buffer size smaller than the header is invalid.
if(buffer_size >= (2 * sizeof(int) )) if((size_t)buffer_size >= (2 * sizeof(int) ))
{ {
this->size = buffer_size; this->size = buffer_size;
buffer = (void*) new char[this->size]; buffer = (void*) new char[this->size];
......
...@@ -797,7 +797,7 @@ mpicom_gather(PyObject *self, PyObject *args) ...@@ -797,7 +797,7 @@ mpicom_gather(PyObject *self, PyObject *args)
return NULL; return NULL;
} }
int rcv_idx = 0; //int rcv_idx = 0;
for(int i=0;i<nprocs;i++) for(int i=0;i<nprocs;i++)
{ {
Buffer obj_buff((void*)&rcv_buffer[rcv_displacements[i]]); Buffer obj_buff((void*)&rcv_buffer[rcv_displacements[i]]);
...@@ -1023,7 +1023,7 @@ mpicom_alltoall(PyObject *self, PyObject *args) ...@@ -1023,7 +1023,7 @@ mpicom_alltoall(PyObject *self, PyObject *args)
} }
PyObject *res= NULL; //PyObject *res= NULL;
if(PySequence_Check(py_obj) == 0) if(PySequence_Check(py_obj) == 0)
{ {
......
...@@ -123,7 +123,7 @@ int QvisGUIApplicationDerived::GetPlotWindowSize() ...@@ -123,7 +123,7 @@ int QvisGUIApplicationDerived::GetPlotWindowSize()
QMainWindow* QvisGUIApplicationDerived::GetPlotWindow(int index) QMainWindow* QvisGUIApplicationDerived::GetPlotWindow(int index)
{ {
if(index >= plotWindows.size() || index < 0) if(index >= (int)plotWindows.size() || index < 0)
return NULL; return NULL;
ActivatePlotWindow(index); ActivatePlotWindow(index);
...@@ -157,7 +157,7 @@ int QvisGUIApplicationDerived::GetOperatorWindowSize() { ...@@ -157,7 +157,7 @@ int QvisGUIApplicationDerived::GetOperatorWindowSize() {
QMainWindow* QvisGUIApplicationDerived::GetOperatorWindow(int index) QMainWindow* QvisGUIApplicationDerived::GetOperatorWindow(int index)
{ {
if(index >= operatorWindows.size() || index < 0) if(index >= (int)operatorWindows.size() || index < 0)
return NULL; return NULL;
ActivateOperatorWindow(index); ActivateOperatorWindow(index);
......
...@@ -523,7 +523,7 @@ PyAnimationAttributes_GetLogString() ...@@ -523,7 +523,7 @@ PyAnimationAttributes_GetLogString()
static void static void
PyAnimationAttributes_CallLogRoutine(Subject *subj, void *data) PyAnimationAttributes_CallLogRoutine(Subject *subj, void *data)
{ {
AnimationAttributes *atts = (AnimationAttributes *)subj; AnimationAttributes *atts = (AnimationAttributes *)subj; (void) atts;
typedef void (*logCallback)(const std::string &); typedef void (*logCallback)(const std::string &);
logCallback cb = (logCallback)data; logCallback cb = (logCallback)data;
......
...@@ -1409,7 +1409,7 @@ PyAnnotationAttributes_GetLogString() ...@@ -1409,7 +1409,7 @@ PyAnnotationAttributes_GetLogString()
static void static void
PyAnnotationAttributes_CallLogRoutine(Subject *subj, void *data) PyAnnotationAttributes_CallLogRoutine(Subject *subj, void *data)
{ {
AnnotationAttributes *atts = (AnnotationAttributes *)subj; AnnotationAttributes *atts = (AnnotationAttributes *)subj; (void) atts;
typedef void (*logCallback)(const std::string &); typedef void (*logCallback)(const std::string &);
logCallback cb = (logCallback)data; logCallback cb = (logCallback)data;
......
...@@ -670,7 +670,7 @@ PyAxes2D_GetLogString() ...@@ -670,7 +670,7 @@ PyAxes2D_GetLogString()
static void static void
PyAxes2D_CallLogRoutine(Subject *subj, void *data) PyAxes2D_CallLogRoutine(Subject *subj, void *data)
{ {
Axes2D *atts = (Axes2D *)subj; Axes2D *atts = (Axes2D *)subj; (void) atts;
typedef void (*logCallback)(const std::string &); typedef void (*logCallback)(const std::string &);
logCallback cb = (logCallback)data; logCallback cb = (logCallback)data;
......
...@@ -899,7 +899,7 @@ PyAxes3D_GetLogString() ...@@ -899,7 +899,7 @@ PyAxes3D_GetLogString()
static void static void
PyAxes3D_CallLogRoutine(Subject *subj, void *data) PyAxes3D_CallLogRoutine(Subject *subj, void *data)
{ {
Axes3D *atts = (Axes3D *)subj; Axes3D *atts = (Axes3D *)subj; (void) atts;
typedef void (*logCallback)(const std::string &); typedef void (*logCallback)(const std::string &);
logCallback cb = (logCallback)data; logCallback cb = (logCallback)data;
......
...@@ -514,7 +514,7 @@ PyAxesArray_GetLogString() ...@@ -514,7 +514,7 @@ PyAxesArray_GetLogString()
static void static void
PyAxesArray_CallLogRoutine(Subject *subj, void *data) PyAxesArray_CallLogRoutine(Subject *subj, void *data)
{ {
AxesArray *atts = (AxesArray *)subj; AxesArray *atts = (AxesArray *)subj; (void) atts;
typedef void (*logCallback)(const std::string &); typedef void (*logCallback)(const std::string &);
logCallback cb = (logCallback)data; logCallback cb = (logCallback)data;
......
...@@ -473,7 +473,7 @@ PyAxisAttributes_GetLogString() ...@@ -473,7 +473,7 @@ PyAxisAttributes_GetLogString()
static void static void
PyAxisAttributes_CallLogRoutine(Subject *subj, void *data) PyAxisAttributes_CallLogRoutine(Subject *subj, void *data)
{ {
AxisAttributes *atts = (AxisAttributes *)subj; AxisAttributes *atts = (AxisAttributes *)subj; (void) atts;
typedef void (*logCallback)(const std::string &); typedef void (*logCallback)(const std::string &);
logCallback cb = (logCallback)data; logCallback cb = (logCallback)data;
......
...@@ -409,7 +409,7 @@ PyAxisLabels_GetLogString() ...@@ -409,7 +409,7 @@ PyAxisLabels_GetLogString()
static void static void
PyAxisLabels_CallLogRoutine(Subject *subj, void *data) PyAxisLabels_CallLogRoutine(Subject *subj, void *data)
{ {
AxisLabels *atts = (AxisLabels *)subj; AxisLabels *atts = (AxisLabels *)subj; (void) atts;
typedef void (*logCallback)(const std::string &); typedef void (*logCallback)(const std::string &);
logCallback cb = (logCallback)data; logCallback cb = (logCallback)data;
......
...@@ -457,7 +457,7 @@ PyAxisTickMarks_GetLogString() ...@@ -457,7 +457,7 @@ PyAxisTickMarks_GetLogString()
static void static void
PyAxisTickMarks_CallLogRoutine(Subject *subj, void *data) PyAxisTickMarks_CallLogRoutine(Subject *subj, void *data)
{ {
AxisTickMarks *atts = (AxisTickMarks *)subj; AxisTickMarks *atts = (AxisTickMarks *)subj; (void) atts;
typedef void (*logCallback)(const std::string &); typedef void (*logCallback)(const std::string &);
logCallback cb = (logCallback)data; logCallback cb = (logCallback)data;
......
...@@ -511,7 +511,7 @@ PyAxisTitles_GetLogString() ...@@ -511,7 +511,7 @@ PyAxisTitles_GetLogString()
static void static void
PyAxisTitles_CallLogRoutine(Subject *subj, void *data) PyAxisTitles_CallLogRoutine(Subject *subj, void *data)
{ {
AxisTitles *atts = (AxisTitles *)subj; AxisTitles *atts = (AxisTitles *)subj; (void) atts;
typedef void (*logCallback)(const std::string &); typedef void (*logCallback)(const std::string &);
logCallback cb = (logCallback)data; logCallback cb = (logCallback)data;
......
...@@ -375,7 +375,7 @@ PyColorAttribute_GetLogString() ...@@ -375,7 +375,7 @@ PyColorAttribute_GetLogString()
static void static void
PyColorAttribute_CallLogRoutine(Subject *subj, void *data) PyColorAttribute_CallLogRoutine(Subject *subj, void *data)
{ {
ColorAttribute *atts = (ColorAttribute *)subj; ColorAttribute *atts = (ColorAttribute *)subj; (void) atts;
typedef void (*logCallback)(const std::string &); typedef void (*logCallback)(const std::string &);
logCallback cb = (logCallback)data; logCallback cb = (logCallback)data;
......
...@@ -109,7 +109,7 @@ ColorAttributeList_GetColors(PyObject *self, PyObject *args) ...@@ -109,7 +109,7 @@ ColorAttributeList_GetColors(PyObject *self, PyObject *args)
int index; int index;
if(!PyArg_ParseTuple(args, "i", &index)) if(!PyArg_ParseTuple(args, "i", &index))
return NULL; return NULL;
if(index < 0 || index >= obj->data->GetColors().size()) if(index < 0 || (size_t)index >= obj->data->GetColors().size())
{ {
char msg[200]; char msg[200];
if(obj->data->GetColors().size() == 0) if(obj->data->GetColors().size() == 0)
...@@ -430,7 +430,7 @@ PyColorAttributeList_GetLogString() ...@@ -430,7 +430,7 @@ PyColorAttributeList_GetLogString()
static void static void
PyColorAttributeList_CallLogRoutine(Subject *subj, void *data) PyColorAttributeList_CallLogRoutine(Subject *subj, void *data)
{ {
ColorAttributeList *atts = (ColorAttributeList *)subj; ColorAttributeList *atts = (ColorAttributeList *)subj; (void) atts;
typedef void (*logCallback)(const std::string &); typedef void (*logCallback)(const std::string &);
logCallback cb = (logCallback)data; logCallback cb = (logCallback)data;
......
...@@ -407,7 +407,7 @@ PyColorControlPoint_GetLogString() ...@@ -407,7 +407,7 @@ PyColorControlPoint_GetLogString()
static void static void
PyColorControlPoint_CallLogRoutine(Subject *subj, void *data) PyColorControlPoint_CallLogRoutine(Subject *subj, void *data)
{ {
ColorControlPoint *atts = (ColorControlPoint *)subj; ColorControlPoint *atts = (ColorControlPoint *)subj; (void) atts;
typedef void (*logCallback)(const std::string &); typedef void (*logCallback)(const std::string &);
logCallback cb = (logCallback)data; logCallback cb = (logCallback)data;
......
...@@ -143,7 +143,7 @@ ColorControlPointList_GetControlPoints(PyObject *self, PyObject *args) ...@@ -143,7 +143,7 @@ ColorControlPointList_GetControlPoints(PyObject *self, PyObject *args)
int index; int index;
if(!PyArg_ParseTuple(args, "i", &index)) if(!PyArg_ParseTuple(args, "i", &index))
return NULL; return NULL;
if(index < 0 || index >= obj->data->GetControlPoints().size()) if(index < 0 || (size_t)index >= obj->data->GetControlPoints().size())
{ {
char msg[200]; char msg[200];
if(obj->data->GetControlPoints().size() == 0) if(obj->data->GetControlPoints().size() == 0)
...@@ -600,7 +600,7 @@ PyColorControlPointList_GetLogString() ...@@ -600,7 +600,7 @@ PyColorControlPointList_GetLogString()
static void static void
PyColorControlPointList_CallLogRoutine(Subject *subj, void *data) PyColorControlPointList_CallLogRoutine(Subject *subj, void *data)
{ {
ColorControlPointList *atts = (ColorControlPointList *)subj; ColorControlPointList *atts = (ColorControlPointList *)subj; (void) atts;
typedef void (*logCallback)(const std::string &); typedef void (*logCallback)(const std::string &);
logCallback cb = (logCallback)data; logCallback cb = (logCallback)data;
......
...@@ -178,7 +178,7 @@ ColorTableAttributes_GetColorTables(PyObject *self, PyObject *args) ...@@ -178,7 +178,7 @@ ColorTableAttributes_GetColorTables(PyObject *self, PyObject *args)
int index; int index;
if(!PyArg_ParseTuple(args, "i", &index)) if(!PyArg_ParseTuple(args, "i", &index))
return NULL; return NULL;
if(index < 0 || index >= obj->data->GetColorTables().size()) if(index < 0 || (size_t)index >= obj->data->GetColorTables().size())
{ {
char msg[200]; char msg[200];
if(obj->data->GetColorTables().size() == 0) if(obj->data->GetColorTables().size() == 0)
...@@ -565,7 +565,7 @@ PyColorTableAttributes_GetLogString() ...@@ -565,7 +565,7 @@ PyColorTableAttributes_GetLogString()
static void static void
PyColorTableAttributes_CallLogRoutine(Subject *subj, void *data) PyColorTableAttributes_CallLogRoutine(Subject *subj, void *data)
{ {
ColorTableAttributes *atts = (ColorTableAttributes *)subj; ColorTableAttributes *atts = (ColorTableAttributes *)subj; (void) atts;
typedef void (*logCallback)(const std::string &); typedef void (*logCallback)(const std::string &);
logCallback cb = (logCallback)data; logCallback cb = (logCallback)data;
......
...@@ -1105,7 +1105,7 @@ PyConstructDataBinningAttributes_GetLogString() ...@@ -1105,7 +1105,7 @@ PyConstructDataBinningAttributes_GetLogString()
static void static void
PyConstructDataBinningAttributes_CallLogRoutine(Subject *subj, void *data) PyConstructDataBinningAttributes_CallLogRoutine(Subject *subj, void *data)
{ {
ConstructDataBinningAttributes *atts = (ConstructDataBinningAttributes *)subj; ConstructDataBinningAttributes *atts = (ConstructDataBinningAttributes *)subj; (void) atts;
typedef void (*logCallback)(const std::string &); typedef void (*logCallback)(const std::string &);
logCallback cb = (logCallback)data; logCallback cb = (logCallback)data;
......
...@@ -379,7 +379,7 @@ PyDBOptionsAttributes_GetLogString() ...@@ -379,7 +379,7 @@ PyDBOptionsAttributes_GetLogString()
static void static void
PyDBOptionsAttributes_CallLogRoutine(Subject *subj, void *data) PyDBOptionsAttributes_CallLogRoutine(Subject *subj, void *data)
{ {
DBOptionsAttributes *atts = (DBOptionsAttributes *)subj; DBOptionsAttributes *atts = (DBOptionsAttributes *)subj; (void) atts;
typedef void (*logCallback)(const std::string &); typedef void (*logCallback)(const std::string &);
logCallback cb = (logCallback)data; logCallback cb = (logCallback)data;
......
...@@ -109,23 +109,23 @@ PyDatabaseCorrelation_ToString(const DatabaseCorrelation *atts, const char *pref ...@@ -109,23 +109,23 @@ PyDatabaseCorrelation_ToString(const DatabaseCorrelation *atts, const char *pref
str += tmpStr; str += tmpStr;
} }
int i, j, index = 0; size_t i, j, index = 0;
const stringVector &databaseNames = correlation.GetDatabaseNames(); const stringVector &databaseNames = correlation.GetDatabaseNames();
for(i = 0; i < databaseNames.size(); ++i) for(i = 0; i < databaseNames.size(); ++i)
{ {
SNPRINTF(tmpStr, 1000, "database[%d]=%s\n", i, databaseNames[i].c_str()); SNPRINTF(tmpStr, 1000, "database[%ld]=%s\n", i, databaseNames[i].c_str());
str += tmpStr; str += tmpStr;
SNPRINTF(tmpStr, 1000, " numStates=%d\n", correlation.GetDatabaseNStates()[i]); SNPRINTF(tmpStr, 1000, " numStates=%d\n", correlation.GetDatabaseNStates()[i]);
str += tmpStr; str += tmpStr;
str += " times={"; str += " times={";
for(j = 0; j < correlation.GetDatabaseNStates()[i]; ++j) for(j = 0; j < (size_t)correlation.GetDatabaseNStates()[i]; ++j)
{ {
SNPRINTF(tmpStr, 1000, "%g, ", correlation.GetDatabaseTimes()[index+j]); SNPRINTF(tmpStr, 1000, "%g, ", correlation.GetDatabaseTimes()[index+j]);
str += tmpStr; str += tmpStr;
} }
str += "}\n"; str += "}\n";
str += " cycles={"; str += " cycles={";
for(j = 0; j < correlation.GetDatabaseNStates()[i]; ++j) for(j = 0; j < (size_t)correlation.GetDatabaseNStates()[i]; ++j)
{ {
SNPRINTF(tmpStr, 1000, "%d, ", correlation.GetDatabaseCycles()[index+j]); SNPRINTF(tmpStr, 1000, "%d, ", correlation.GetDatabaseCycles()[index+j]);
str += tmpStr; str += tmpStr;
...@@ -135,7 +135,7 @@ PyDatabaseCorrelation_ToString(const DatabaseCorrelation *atts, const char *pref ...@@ -135,7 +135,7 @@ PyDatabaseCorrelation_ToString(const DatabaseCorrelation *atts, const char *pref
index += correlation.GetDatabaseNStates()[i]; index += correlation.GetDatabaseNStates()[i];
str += " indices={"; str += " indices={";
for(j = 0; j < correlation.GetNumStates(); ++j) for(j = 0; j < (size_t)correlation.GetNumStates(); ++j)
{ {
SNPRINTF(tmpStr, 1000, "%d, ", correlation.GetIndices()[i*correlation.GetNumStates() + j]); SNPRINTF(tmpStr, 1000, "%d, ", correlation.GetIndices()[i*correlation.GetNumStates() + j]);
str += tmpStr; str += tmpStr;
...@@ -209,7 +209,7 @@ DatabaseCorrelation_GetDatabaseNames(PyObject *self, PyObject *args) ...@@ -209,7 +209,7 @@ DatabaseCorrelation_GetDatabaseNames(PyObject *self, PyObject *args)
// Allocate a tuple the with enough entries to hold the databaseNames. // Allocate a tuple the with enough entries to hold the databaseNames.
const stringVector &databaseNames = obj->data->GetDatabaseNames(); const stringVector &databaseNames = obj->data->GetDatabaseNames();
PyObject *retval = PyTuple_New(databaseNames.size()); PyObject *retval = PyTuple_New(databaseNames.size());
for(int i = 0; i < databaseNames.size(); ++i) for(size_t i = 0; i < databaseNames.size(); ++i)
PyTuple_SET_ITEM(retval, i, PyString_FromString(databaseNames[i].c_str())); PyTuple_SET_ITEM(retval, i, PyString_FromString(databaseNames[i].c_str()));
return retval; return retval;
} }
...@@ -221,7 +221,7 @@ DatabaseCorrelation_GetDatabaseNStates(PyObject *self, PyObject *args) ...@@ -221,7 +221,7 @@ DatabaseCorrelation_GetDatabaseNStates(PyObject *self, PyObject *args)
// Allocate a tuple the with enough entries to hold the databaseNStates. // Allocate a tuple the with enough entries to hold the databaseNStates.
const intVector &databaseNStates = obj->data->GetDatabaseNStates(); const intVector &databaseNStates = obj->data->GetDatabaseNStates();
PyObject *retval = PyTuple_New(databaseNStates.size()); PyObject *retval = PyTuple_New(databaseNStates.size());
for(int i = 0; i < databaseNStates.size(); ++i) for(size_t i = 0; i < databaseNStates.size(); ++i)
PyTuple_SET_ITEM(retval, i, PyInt_FromLong(long(databaseNStates[i]))); PyTuple_SET_ITEM(retval, i, PyInt_FromLong(long(databaseNStates[i])));
return retval; return retval;
} }
...@@ -250,7 +250,7 @@ DatabaseCorrelation_GetCorrelatedTimeStates(PyObject *self, PyObject *args) ...@@ -250,7 +250,7 @@ DatabaseCorrelation_GetCorrelatedTimeStates(PyObject *self, PyObject *args)
// Allocate a tuple the with enough entries to hold the correlated // Allocate a tuple the with enough entries to hold the correlated
// time states. // time states.
retval = PyTuple_New(states.size()); retval = PyTuple_New(states.size());
for(int i = 0; i < states.size(); ++i) for(size_t i = 0; i < states.size(); ++i)
PyTuple_SET_ITEM(retval, i, PyLong_FromLong(states[i])); PyTuple_SET_ITEM(retval, i, PyLong_FromLong(states[i]));
} }
else else
...@@ -318,7 +318,7 @@ DatabaseCorrelation_GetDatabaseCycleForState(PyObject *self, PyObject *args) ...@@ -318,7 +318,7 @@ DatabaseCorrelation_GetDatabaseCycleForState(PyObject *self, PyObject *args)
int index = 0; int index = 0;
if(state >= 0) if(state >= 0)
{ {
for(int i = 0; i < databaseNames.size(); ++i) for(size_t i = 0; i < databaseNames.size(); ++i)
{ {
if(databaseNames[i] == db) if(databaseNames[i] == db)
{ {
...@@ -349,7 +349,7 @@ DatabaseCorrelation_GetDatabaseTimeForState(PyObject *self, PyObject *args) ...@@ -349,7 +349,7 @@ DatabaseCorrelation_GetDatabaseTimeForState(PyObject *self, PyObject *args)
int index = 0;