Commit 80ed2323 authored by hkrishna's avatar hkrishna

warning fixes for sim directory

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@23643 18c085ea-50e0-402c-830e-de6fd14e8384
parent fcf87ad8
......@@ -1177,7 +1177,7 @@ int VisItDetectInput(int blocking, int consoleFileDescriptor)
*******************************************************************************/
int VisItAttemptToCompleteConnection(void)
{
int socket;
int socket = -1; /// TODO: check if initialization is correct
/* wait for a connection -- only process 0 does this */
if (parallelRank == 0)
{
......
......@@ -234,7 +234,7 @@ f_visit_internal_commandcallback(const char *cmd, int intdata, float floatdata,
char *end = NULL;
if((end = strstr(cmd, ";QPushButton;Simulations;NONE")) != NULL)
{
int i;
//int i;
lcmd = end - cmd - 10;
realcmd = ALLOC(char, lcmd + 1);
memset(realcmd, 0, lcmd + 1);
......@@ -2352,7 +2352,7 @@ F_VISITMESHPOINT2(int *meshid, int *ndims, int *nnodes, float *x, float *y,
VisIt_MeshData *mesh = (VisIt_MeshData *)GetFortranPointer(*meshid);
if(mesh)
{
int i;
//int i;
mesh->meshType = VISIT_MESHTYPE_POINT;
mesh->pmesh = ALLOC(VisIt_PointMesh,1);
memset(mesh->pmesh, 0, sizeof(VisIt_PointMesh));
......@@ -2412,7 +2412,7 @@ F_VISITMESHUNSTRUCTURED2(int *meshid, int *ndims, int *nnodes, int *nzones,
VisIt_MeshData *mesh = (VisIt_MeshData *)GetFortranPointer(*meshid);
if(mesh)
{
int i;
//int i;
mesh->meshType = VISIT_MESHTYPE_UNSTRUCTURED;
mesh->umesh = ALLOC(VisIt_UnstructuredMesh,1);
memset(mesh->umesh, 0, sizeof(VisIt_UnstructuredMesh));
......@@ -2845,7 +2845,7 @@ F_VISITMATERIALADDCLEAN(int *mhandle, int *cell, int *matno)
}
else
{
int i, cellid = -1;
int cellid = -1;
if(ml->ndims == 1)
cellid = cell[0]-1;
else if(ml->ndims == 2)
......@@ -2906,7 +2906,7 @@ F_VISITMATERIALADDMIXED(int *mhandle, int *cell, int *matnos, float *matvf,
}
else
{
int i, cellid = -1;
int cellid = -1;
if(ml->ndims == 1)
cellid = cell[0]-1;
else if(ml->ndims == 2)
......
......@@ -58,8 +58,8 @@ sim_ui_handle(const char *name, char *args)
{
/* Get the arguments. */
char *cptr = NULL;
char *className = NULL, *signalName = NULL, *value = NULL;
className = cptr = args;
char *signalName = NULL, *value = NULL;
cptr = args;
while(*cptr != ';')
cptr++;
*cptr++ = '\0';
......
......@@ -3002,7 +3002,7 @@ VisItGetSockets(VISIT_SOCKET *lSocket, VISIT_SOCKET *cSocket)
*******************************************************************************/
int VisItAttemptToCompleteConnection(void)
{
VISIT_SOCKET socket;
VISIT_SOCKET socket = -1; //TODO: verify initialization is safe
LIBSIM_API_ENTER(VisItAttemptToCompleteConnection);
......@@ -3932,7 +3932,6 @@ VisItGetMemory(double *m_size, double *m_rss)
{
int retval = VISIT_ERROR;
unsigned long tmp1, tmp2;
LIBSIM_API_ENTER(VisItGetMemory);
/* Make sure the function exists before using it. - not sure if this is required, need to talk to
Brad */
......@@ -3950,6 +3949,7 @@ VisItGetMemory(double *m_size, double *m_rss)
*m_rss = (unsigned long)m.bytes_total; // not quite accurate but this should be the total
// amount allocated by malloc.
#elif !defined(_WIN32)
unsigned long tmp1, tmp2;
FILE *file = fopen("/proc/self/statm", "r");
if (file == NULL)
{
......
......@@ -37,7 +37,7 @@ void
visit_cstring_to_fstring(const char *src, char *dest, int len)
{
int i;
char *c = dest;
//char *c = dest;
for(i = 0; i < len; ++i)
{
if(*src != '\0')
......
......@@ -414,7 +414,7 @@ F_VISITGETENV(VISIT_F77STRING env, int *lenv)
if(src != NULL)
{
size_t len, sz;
size_t len, sz = 1; /// TODO: WARNING sz was uninitalized setting to 1 so the sz == 0 gets triggered if it needs to be (CHECK)
len = strlen(src);
sz = (len < *lenv) ? (sz - 1) : (*lenv - 1);
if(sz == 0)
......
......@@ -157,7 +157,7 @@ simv2_NameList_getName(visit_handle h, int i, char **val)
}
int retval = VISIT_ERROR;
VisIt_NameList *obj = GetObject(h, "simv2_NameList_getName");
if(obj != NULL && i >= 0 && i < obj->names.size())
if(obj != NULL && i >= 0 && i < (int)obj->names.size())
{
*val = (char *)malloc(obj->names[i].size() + 1);
strcpy(*val, obj->names[i].c_str());
......
......@@ -285,7 +285,7 @@ simv2_SpeciesMetaData_getSpeciesName(visit_handle h, int i, visit_handle *val)
}
int retval = VISIT_ERROR;
VisIt_SpeciesMetaData *obj = GetObject(h, "simv2_SpeciesMetaData_getSpeciesName");
if(obj != NULL && i >= 0 && i < obj->speciesNames.size())
if(obj != NULL && i >= 0 && i < (int)obj->speciesNames.size())
{
*val = obj->speciesNames[i];
retval = VISIT_OKAY;
......
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