[cig-commits] commit: Fix a number of compiler warnings
Mercurial
hg at geodynamics.org
Fri Oct 7 23:38:53 PDT 2011
changeset: 808:0e60363584a7
tag: tip
user: Walter Landry <wlandry at caltech.edu>
date: Fri Oct 07 23:37:14 2011 -0700
files: Base/Container/src/BTree.cxx Base/Container/src/List.cxx Base/Container/src/RangeSet.cxx Base/Container/src/UIntMap.cxx Base/Container/tests/MemoryPoolSuite.cxx Base/Extensibility/src/ExtensionManager.cxx Base/Extensibility/src/PluginsManager.cxx Base/Foundation/src/Memory.cxx Base/Foundation/src/TimeMonitor.cxx Base/IO/src/Journal.cxx Base/IO/tests/JournalSuite.cxx libStGermain/src/main.cxx
description:
Fix a number of compiler warnings
diff -r 56b67b7ba8da -r 0e60363584a7 Base/Container/src/BTree.cxx
--- a/Base/Container/src/BTree.cxx Tue Oct 04 14:20:24 2011 -0700
+++ b/Base/Container/src/BTree.cxx Fri Oct 07 23:37:14 2011 -0700
@@ -124,16 +124,12 @@ void BTree_Init( BTree *self )
void BTree_LeftRotate( BTree *tree, BTreeNode *x )
{
-
- BTreeNode *root;
BTreeNode *y;
assert( tree );
assert( x );
y = x->right;
- root = tree->root;
-
if (x == NIL){
}
@@ -169,15 +165,12 @@ void BTree_LeftRotate( BTree *tree, BTre
void BTree_RightRotate( BTree *tree, BTreeNode *x ) {
- BTreeNode *root;
BTreeNode *y;
assert( tree );
assert( x );
y = x->left;
- root = tree->root;
-
if( x == NIL ){
}
diff -r 56b67b7ba8da -r 0e60363584a7 Base/Container/src/List.cxx
--- a/Base/Container/src/List.cxx Tue Oct 04 14:20:24 2011 -0700
+++ b/Base/Container/src/List.cxx Fri Oct 07 23:37:14 2011 -0700
@@ -100,10 +100,6 @@ void _List_Print( void* list, Stream* st
void _List_Print( void* list, Stream* stream ) {
List* self = (List*)list;
- /* Set the Journal for printing informations */
- Stream* listStream;
- listStream = Journal_Register( InfoStream_Type, "ListStream" );
-
/* Print parent */
Journal_Printf( stream, "List (ptr): (%p)\n", self );
_Stg_Class_Print( self, stream );
diff -r 56b67b7ba8da -r 0e60363584a7 Base/Container/src/RangeSet.cxx
--- a/Base/Container/src/RangeSet.cxx Tue Oct 04 14:20:24 2011 -0700
+++ b/Base/Container/src/RangeSet.cxx Fri Oct 07 23:37:14 2011 -0700
@@ -104,10 +104,6 @@ void _RangeSet_Print( void* rangeSet, St
void _RangeSet_Print( void* rangeSet, Stream* stream ) {
RangeSet* self = (RangeSet*)rangeSet;
- /* Set the Journal for printing informations */
- Stream* rangeSetStream;
- rangeSetStream = Journal_Register( InfoStream_Type, "RangeSetStream" );
-
/* Print parent */
Journal_Printf( stream, "RangeSet (ptr): (%p)\n", self );
_Stg_Class_Print( self, stream );
diff -r 56b67b7ba8da -r 0e60363584a7 Base/Container/src/UIntMap.cxx
--- a/Base/Container/src/UIntMap.cxx Tue Oct 04 14:20:24 2011 -0700
+++ b/Base/Container/src/UIntMap.cxx Fri Oct 07 23:37:14 2011 -0700
@@ -105,10 +105,6 @@ void _UIntMap_Print( void* generator, St
void _UIntMap_Print( void* generator, Stream* stream ) {
UIntMap* self = (UIntMap*)generator;
- /* Set the Journal for printing informations */
- Stream* generatorStream;
- generatorStream = Journal_Register( InfoStream_Type, "UIntMapStream" );
-
/* Print parent */
Journal_Printf( stream, "UIntMap (ptr): (%p)\n", self );
_Stg_Class_Print( self, stream );
diff -r 56b67b7ba8da -r 0e60363584a7 Base/Container/tests/MemoryPoolSuite.cxx
--- a/Base/Container/tests/MemoryPoolSuite.cxx Tue Oct 04 14:20:24 2011 -0700
+++ b/Base/Container/tests/MemoryPoolSuite.cxx Fri Oct 07 23:37:14 2011 -0700
@@ -154,7 +154,6 @@ void MemoryPoolSuite_TestIllegalDealloca
void MemoryPoolSuite_TestIllegalDeallocation( MemoryPoolSuiteData* data ) {
Plane* p = NULL;
int i = 0;
- Bool passed = False;
int objCounter = 0;
int* junkRefs[CACHE_SIZE];
int testData[CACHE_SIZE];
@@ -166,7 +165,6 @@ void MemoryPoolSuite_TestIllegalDealloca
data->planeRefs[i] = p;
}
- passed = True;
for( i=0; i<CACHE_SIZE; i++ ){
junkRefs[i] = &testData[i];
}
diff -r 56b67b7ba8da -r 0e60363584a7 Base/Extensibility/src/ExtensionManager.cxx
--- a/Base/Extensibility/src/ExtensionManager.cxx Tue Oct 04 14:20:24 2011 -0700
+++ b/Base/Extensibility/src/ExtensionManager.cxx Fri Oct 07 23:37:14 2011 -0700
@@ -807,7 +807,7 @@ void* ExtensionManager_Malloc( void* ext
/*Index obj_I;*/
/*Index ext_I;*/
- void* curObj;
+ // void* curObj;
if ( ExtensionManager_OfExisting( self ) ) {
return NULL;
@@ -817,7 +817,7 @@ void* ExtensionManager_Malloc( void* ext
memset( result, 0, ExtensionManager_GetFinalSize( self ) * count );
if ( ExtensionManager_GetFinalSize( self ) > 0 ) {
- curObj = result;
+ // curObj = result;
/*
for ( obj_I = 0; obj_I < count; ++obj_I ) {
HashTable* objHt = HashTable_New( NULL, NULL, NULL, HASHTABLE_POINTER_KEY );
diff -r 56b67b7ba8da -r 0e60363584a7 Base/Extensibility/src/PluginsManager.cxx
--- a/Base/Extensibility/src/PluginsManager.cxx Tue Oct 04 14:20:24 2011 -0700
+++ b/Base/Extensibility/src/PluginsManager.cxx Fri Oct 07 23:37:14 2011 -0700
@@ -153,12 +153,9 @@ void PluginsManager_RemoveAllFromCompone
}
Bool _PluginsManager_CheckContext( void* pluginsManager, Dictionary_Entry_Value* modulesVal, unsigned int entry_I, Name contextName ) {
- PluginsManager* self;
Dictionary_Entry_Value* pluginDEV = Dictionary_Entry_Value_GetElement( modulesVal, entry_I );
Dictionary* pluginDict;
Name componentName;
-
- self = (PluginsManager*)pluginsManager;
pluginDict = Dictionary_Entry_Value_AsDictionary( pluginDEV );
if( !pluginDict )
@@ -173,13 +170,10 @@ Bool _PluginsManager_CheckContext( void*
}
Name _PluginsManager_GetModuleName( void* pluginsManager, Dictionary_Entry_Value* moduleVal, unsigned int entry_I ) {
- PluginsManager* self;
Dictionary_Entry_Value* pluginDEV = Dictionary_Entry_Value_GetElement( moduleVal, entry_I );
Dictionary* pluginDict = Dictionary_Entry_Value_AsDictionary( pluginDEV );
Name pluginName = Dictionary_GetString( pluginDict, "Type" );
- self = (PluginsManager*)pluginsManager;
-
return pluginName;
}
diff -r 56b67b7ba8da -r 0e60363584a7 Base/Foundation/src/Memory.cxx
--- a/Base/Foundation/src/Memory.cxx Tue Oct 04 14:20:24 2011 -0700
+++ b/Base/Foundation/src/Memory.cxx Fri Oct 07 23:37:14 2011 -0700
@@ -1373,7 +1373,6 @@ void Memory_Print_Type_Name_Func( Type t
{
MemoryField* typeField;
MemoryField* nameField;
- MemoryPointer* memPtr;
MemoryPointer_Print_Type_Name_Func_Helper_Arg arguments;
@@ -1386,7 +1385,6 @@ void Memory_Print_Type_Name_Func( Type t
Stream_Indent( stgMemory->infoStream );
- memPtr = NULL;
arguments.printOptions = (MemoryPointerColumn)(
MEMORYPOINTER_PTR |
MEMORYPOINTER_FILE |
@@ -1418,7 +1416,6 @@ void Memory_Print_File_Function( char* f
{
MemoryField* fileField;
MemoryField* funcField;
- MemoryPointer* memPtr;
MemoryPointer_Print_File_Func_Helper_Arg arguments;
fileField = MemoryField_Register( stgMemory->files, fileName );
@@ -1432,7 +1429,6 @@ void Memory_Print_File_Function( char* f
Stream_Indent( stgMemory->infoStream );
- memPtr = NULL;
arguments.printOptions = (MemoryPointerColumn)(
MEMORYPOINTER_PTR |
MEMORYPOINTER_TYPE |
diff -r 56b67b7ba8da -r 0e60363584a7 Base/Foundation/src/TimeMonitor.cxx
--- a/Base/Foundation/src/TimeMonitor.cxx Tue Oct 04 14:20:24 2011 -0700
+++ b/Base/Foundation/src/TimeMonitor.cxx Fri Oct 07 23:37:14 2011 -0700
@@ -115,7 +115,7 @@ double Stg_TimeMonitor_End( Stg_TimeMoni
tmData->aveProcDt = tmData->dt;
}
else {
- double sumdt;
+ // double sumdt;
/*
MPI_Reduce( &tmData->dt, &tmData->maxProcDt, 1, MPI_DOUBLE, MPI_MAX, 0, tm->comm );
@@ -127,7 +127,7 @@ double Stg_TimeMonitor_End( Stg_TimeMoni
* that ALL procs will call end(). This is currently not the case with Stg_Component_Initialise()
* phase as some procs will have more/less variables to call Initialise() on via Variable_Condition
* due to decomposition and Wall boundary conditions */
- sumdt = tmData->dt * nProc;
+ // sumdt = tmData->dt * nProc;
tmData->maxProcDt = tmData->dt;
tmData->minProcDt = tmData->dt;
tmData->aveProcDt = (double)tmData->dt;
diff -r 56b67b7ba8da -r 0e60363584a7 Base/IO/src/Journal.cxx
--- a/Base/IO/src/Journal.cxx Tue Oct 04 14:20:24 2011 -0700
+++ b/Base/IO/src/Journal.cxx Fri Oct 07 23:37:14 2011 -0700
@@ -162,16 +162,12 @@ void Journal_ReadFromDictionary( Diction
char* operation;
- Bool valid;
-
/* Iterate through the whole dictionary, checking for journal related commands */
for ( index = 0; index < dictionary->count; ++index )
{
/* Check to see if it is a journal operation by searching for the JOURNAL_KEY. */
if ( (0 == strncasecmp( dictionary->entryPtr[index]->key, JOURNAL_KEY, strlen(JOURNAL_KEY))) )
{
- valid = True;
-
/* Make copy to tokenise so original contents will not be destroyed */
keyCopy = StG_Strdup( dictionary->entryPtr[index]->key );
diff -r 56b67b7ba8da -r 0e60363584a7 Base/IO/tests/JournalSuite.cxx
--- a/Base/IO/tests/JournalSuite.cxx Tue Oct 04 14:20:24 2011 -0700
+++ b/Base/IO/tests/JournalSuite.cxx Fri Oct 07 23:37:14 2011 -0700
@@ -285,12 +285,9 @@ void JournalSuite_TestPrintChildStreams(
void JournalSuite_TestReadFromDictionary( JournalSuiteData* data ) {
Dictionary* testDict = Dictionary_New();
- Stream* infoTest1;
Stream* infoTest2;
Stream* debugTest1;
- Stream* debugTest2;
Stream* dumpTest1;
- Stream* dumpTest2;
Stream* newTest1;
Stream* newTest2;
Stream* fileTest1;
@@ -300,12 +297,9 @@ void JournalSuite_TestReadFromDictionary
Name testNewTypeFilename1 = "./testJournal-out1.txt";
Name testNewTypeFilename2 = "./testJournal-out2.txt";
- infoTest1 = Journal_Register( Info_Type, (Name)"test1" );
infoTest2 = Journal_Register( Info_Type, (Name)"test2" );
debugTest1 = Journal_Register( Debug_Type, (Name)"test1" );
- debugTest2 = Journal_Register( Debug_Type, (Name)"test2" );
dumpTest1 = Journal_Register( Dump_Type, (Name)"test1" );
- dumpTest2 = Journal_Register( Dump_Type, (Name)"test2" );
Dictionary_Add( testDict, (Dictionary_Entry_Key)"journal.debug.test1", Dictionary_Entry_Value_FromBool( True ) );
Dictionary_Add( testDict, (Dictionary_Entry_Key)"journal.dump.test1", Dictionary_Entry_Value_FromBool( True ) );
diff -r 56b67b7ba8da -r 0e60363584a7 libStGermain/src/main.cxx
--- a/libStGermain/src/main.cxx Tue Oct 04 14:20:24 2011 -0700
+++ b/libStGermain/src/main.cxx Fri Oct 07 23:37:14 2011 -0700
@@ -115,13 +115,12 @@ void stgMainBuildAndInitialise( Stg_Comp
Stg_ComponentFactory* stgMainInitFromXML( char* xmlInputFilename, MPI_Comm communicator, void* _context ) {
Dictionary* dictionary = NULL;
- Bool result;
XML_IO_Handler* ioHandler;
Stg_ComponentFactory* cf;
dictionary = Dictionary_New();
ioHandler = XML_IO_Handler_New();
- result = IO_Handler_ReadAllFromFile( ioHandler, xmlInputFilename, dictionary );
+ IO_Handler_ReadAllFromFile( ioHandler, xmlInputFilename, dictionary );
/* In case the user has put any journal configuration in the XML, read here */
Journal_ReadFromDictionary( dictionary );
More information about the CIG-COMMITS
mailing list