[cig-commits] commit: Fix compiler warnings

Mercurial hg at geodynamics.org
Fri Sep 30 14:41:56 PDT 2011


changeset:   621:a09d9037dfc0
user:        Walter Landry <wlandry at caltech.edu>
date:        Fri Sep 30 14:38:20 2011 -0700
files:       Geometry/tests/VectorMathSuite.cxx Mesh/src/CartesianGenerator.cxx Mesh/src/MeshClass.cxx Mesh/src/Mesh_Algorithms.cxx Mesh/src/Mesh_CentroidAlgorithms.cxx Mesh/src/Mesh_ElementType.cxx Mesh/src/Mesh_HexAlgorithms.cxx Mesh/src/Mesh_RegularAlgorithms.cxx Mesh/src/SurfaceAdaptor.cxx Swarm/src/ElementCellLayout.cxx Swarm/src/FileParticleLayout.cxx Swarm/src/GaussBorderParticleLayout.cxx
description:
Fix compiler warnings


diff -r 23b72f3e8b3a -r a09d9037dfc0 Geometry/tests/VectorMathSuite.cxx
--- a/Geometry/tests/VectorMathSuite.cxx	Thu Sep 29 15:07:55 2011 -0700
+++ b/Geometry/tests/VectorMathSuite.cxx	Fri Sep 30 14:38:20 2011 -0700
@@ -157,8 +157,6 @@ void VectorMathSuite_TestVectorFunctions
 		double k[] = {0.0,0.0,1.0};
 		double A[] = { 7.4, 2  ,   5  ,  1,  3 ,   -42};
 		double B[] = { 4  , 2.3,   5.8,  6, -12, 39289};
-		double C[] = {23  , 5  , -14  , 32, -21,    78};
-		double D[] = {23  , 5  , -14  , 32, -21,    78};
 		double angle;
 		double vector[6];
 		int d;
diff -r 23b72f3e8b3a -r a09d9037dfc0 Mesh/src/CartesianGenerator.cxx
--- a/Mesh/src/CartesianGenerator.cxx	Thu Sep 29 15:07:55 2011 -0700
+++ b/Mesh/src/CartesianGenerator.cxx	Fri Sep 30 14:38:20 2011 -0700
@@ -690,7 +690,7 @@ void _CartesianGenerator_GenVertices( vo
 	Grid*			grid;
 	unsigned		nEls;
 	unsigned		nLocals, *locals;
-	unsigned		nRemotes/*, *remotes*/;
+	// unsigned		nRemotes/*, *remotes*/;
 	unsigned		*dstArray, *dstCount;
 	unsigned		*dimInds, *rankInds;
 	unsigned	d_i, e_i;
@@ -723,7 +723,7 @@ void _CartesianGenerator_GenVertices( vo
 	Grid_Lift( self->procGrid, rank, rankInds );
 
 	nLocals = 0;
-	nRemotes = 0;
+	// nRemotes = 0;
 	for( e_i = 0; e_i < nEls; e_i++ ) {
 		Grid_Lift( grid, e_i, dimInds );
 /*
diff -r 23b72f3e8b3a -r a09d9037dfc0 Mesh/src/MeshClass.cxx
--- a/Mesh/src/MeshClass.cxx	Thu Sep 29 15:07:55 2011 -0700
+++ b/Mesh/src/MeshClass.cxx	Fri Sep 30 14:38:20 2011 -0700
@@ -136,10 +136,6 @@ void _Mesh_Print( void* mesh, Stream* st
 void _Mesh_Print( void* mesh, Stream* stream ) {
 	Mesh*	self = (Mesh*)mesh;
 	
-	/* Set the Journal for printing informations */
-	Stream* meshStream;
-	meshStream = Journal_Register( InfoStream_Type, (Name)"MeshStream"  );
-
 	/* Print parent */
 	Journal_Printf( stream, "Mesh (ptr): (%p)\n", self );
 	Journal_Printf( stream, "\t_getBasis (func ptr): %p\n", self->_getBasis );
diff -r 23b72f3e8b3a -r a09d9037dfc0 Mesh/src/Mesh_Algorithms.cxx
--- a/Mesh/src/Mesh_Algorithms.cxx	Thu Sep 29 15:07:55 2011 -0700
+++ b/Mesh/src/Mesh_Algorithms.cxx	Fri Sep 30 14:38:20 2011 -0700
@@ -124,10 +124,6 @@ void _Mesh_Algorithms_Print( void* algor
 void _Mesh_Algorithms_Print( void* algorithms, Stream* stream ) {
 	Mesh_Algorithms*	self = (Mesh_Algorithms*)algorithms;
 	
-	/* Set the Journal for printing informations */
-	Stream* algorithmsStream;
-	algorithmsStream = Journal_Register( InfoStream_Type, (Name)"Mesh_AlgorithmsStream"  );
-
 	/* Print parent */
 	Journal_Printf( stream, "Mesh_Algorithms (ptr): (%p)\n", self );
 	_Stg_Component_Print( self, stream );
@@ -256,7 +252,6 @@ Bool _Mesh_Algorithms_SearchElements( vo
 		nDims = Mesh_GetDimSize( mesh );
 		if( dim != nDims ) {
 			unsigned	nInc, *inc;
-			unsigned	nLocalEls;
 			unsigned	lowest;
 			unsigned	global;
 			unsigned	inc_i;
@@ -265,8 +260,6 @@ Bool _Mesh_Algorithms_SearchElements( vo
 			assert(Mesh_HasIncidence(mesh,(MeshTopology_Dim)dim,
                                                  (MeshTopology_Dim)nDims));
 
-			nLocalEls = Mesh_GetLocalSize(mesh,
-                                                      (MeshTopology_Dim)nDims);
 			Mesh_GetIncidence( mesh, (MeshTopology_Dim)dim,
                                            ind, (MeshTopology_Dim)nDims,
                                            self->incArray );
diff -r 23b72f3e8b3a -r a09d9037dfc0 Mesh/src/Mesh_CentroidAlgorithms.cxx
--- a/Mesh/src/Mesh_CentroidAlgorithms.cxx	Thu Sep 29 15:07:55 2011 -0700
+++ b/Mesh/src/Mesh_CentroidAlgorithms.cxx	Fri Sep 30 14:38:20 2011 -0700
@@ -112,10 +112,6 @@ void _Mesh_CentroidAlgorithms_Print( voi
 void _Mesh_CentroidAlgorithms_Print( void* _centroidAlgorithms, Stream* stream ) {
 	Mesh_CentroidAlgorithms* self= (Mesh_CentroidAlgorithms*)_centroidAlgorithms;
 	
-	/* Set the Journal for printing informations */
-	Stream* centroidAlgorithmsStream;
-	centroidAlgorithmsStream = Journal_Register( InfoStream_Type, (Name)"Mesh_CentroidAlgorithmsStream"  );
-
 	/* Print parent */
 	Journal_Printf( stream, "Mesh_CentroidAlgorithms (ptr): (%p)\n", self );
 	_Mesh_Algorithms_Print( self, stream );
diff -r 23b72f3e8b3a -r a09d9037dfc0 Mesh/src/Mesh_ElementType.cxx
--- a/Mesh/src/Mesh_ElementType.cxx	Thu Sep 29 15:07:55 2011 -0700
+++ b/Mesh/src/Mesh_ElementType.cxx	Fri Sep 30 14:38:20 2011 -0700
@@ -85,9 +85,6 @@ void _Mesh_ElementType_Delete( void* ele
 
 void _Mesh_ElementType_Print( void* elementType, Stream* stream ) {
 	Mesh_ElementType*	self = (Mesh_ElementType*)elementType;
-	Stream*			elementTypeStream;
-
-	elementTypeStream = Journal_Register( InfoStream_Type, (Name)"Mesh_ElementTypeStream"  );
 
 	/* Print parent */
 	Journal_Printf( stream, "Mesh_ElementType (ptr): (%p)\n", self );
diff -r 23b72f3e8b3a -r a09d9037dfc0 Mesh/src/Mesh_HexAlgorithms.cxx
--- a/Mesh/src/Mesh_HexAlgorithms.cxx	Thu Sep 29 15:07:55 2011 -0700
+++ b/Mesh/src/Mesh_HexAlgorithms.cxx	Fri Sep 30 14:38:20 2011 -0700
@@ -107,10 +107,6 @@ void _Mesh_HexAlgorithms_Print( void* he
 void _Mesh_HexAlgorithms_Print( void* hexAlgorithms, Stream* stream ) {
 	Mesh_HexAlgorithms*	self = (Mesh_HexAlgorithms*)hexAlgorithms;
 	
-	/* Set the Journal for printing informations */
-	Stream* hexAlgorithmsStream;
-	hexAlgorithmsStream = Journal_Register( InfoStream_Type, (Name)"Mesh_HexAlgorithmsStream"  );
-
 	/* Print parent */
 	Journal_Printf( stream, "Mesh_HexAlgorithms (ptr): (%p)\n", self );
 	_Mesh_Algorithms_Print( self, stream );
diff -r 23b72f3e8b3a -r a09d9037dfc0 Mesh/src/Mesh_RegularAlgorithms.cxx
--- a/Mesh/src/Mesh_RegularAlgorithms.cxx	Thu Sep 29 15:07:55 2011 -0700
+++ b/Mesh/src/Mesh_RegularAlgorithms.cxx	Fri Sep 30 14:38:20 2011 -0700
@@ -113,10 +113,6 @@ void _Mesh_RegularAlgorithms_Print( void
 void _Mesh_RegularAlgorithms_Print( void* algorithms, Stream* stream ) {
 	Mesh_RegularAlgorithms*	self = (Mesh_RegularAlgorithms*)algorithms;
 	
-	/* Set the Journal for printing informations */
-	Stream* algorithmsStream;
-	algorithmsStream = Journal_Register( InfoStream_Type, (Name)"Mesh_RegularAlgorithmsStream"  );
-
 	/* Print parent */
 	Journal_Printf( stream, "Mesh_RegularAlgorithms (ptr): (%p)\n", self );
 	_Mesh_Algorithms_Print( self, stream );
@@ -231,10 +227,6 @@ Bool Mesh_RegularAlgorithms_SearchElemen
 }
 
 double _Mesh_RegularAlgorithms_GetMinimumSeparation( void* algorithms, void* _mesh, double* perDim ) {
-	Mesh* mesh;
-
-	mesh = (Mesh*)_mesh;
-
 	/* TODO */
 	abort();
 
diff -r 23b72f3e8b3a -r a09d9037dfc0 Mesh/src/SurfaceAdaptor.cxx
--- a/Mesh/src/SurfaceAdaptor.cxx	Thu Sep 29 15:07:55 2011 -0700
+++ b/Mesh/src/SurfaceAdaptor.cxx	Fri Sep 30 14:38:20 2011 -0700
@@ -122,10 +122,6 @@ void _SurfaceAdaptor_Print( void* adapto
 void _SurfaceAdaptor_Print( void* adaptor, Stream* stream ) {
 	SurfaceAdaptor*	self = (SurfaceAdaptor*)adaptor;
 	
-	/* Set the Journal for printing informations */
-	Stream* adaptorStream;
-	adaptorStream = Journal_Register( InfoStream_Type, (Name)"SurfaceAdaptorStream"  );
-
 	/* Print parent */
 	Journal_Printf( stream, "SurfaceAdaptor (ptr): (%p)\n", self );
 	_MeshAdaptor_Print( self, stream );
diff -r 23b72f3e8b3a -r a09d9037dfc0 Swarm/src/ElementCellLayout.cxx
--- a/Swarm/src/ElementCellLayout.cxx	Thu Sep 29 15:07:55 2011 -0700
+++ b/Swarm/src/ElementCellLayout.cxx	Fri Sep 30 14:38:20 2011 -0700
@@ -226,12 +226,10 @@ void _ElementCellLayout_InitialisePoints
 {
 	ElementCellLayout* self = (ElementCellLayout*)elementCellLayout;
 	Cell_PointIndex point_I;
-	unsigned	nInc;
 	unsigned*	inc;
 
 	Mesh_GetIncidence( self->mesh, Mesh_GetDimSize( self->mesh ), cellIndex, MT_VERTEX, 
 			   self->incArray );
-	nInc = IArray_GetSize( self->incArray );
 	inc = (unsigned*)IArray_GetPtr( self->incArray );
 	
 	/* point to the mesh's node's coordinates */
diff -r 23b72f3e8b3a -r a09d9037dfc0 Swarm/src/FileParticleLayout.cxx
--- a/Swarm/src/FileParticleLayout.cxx	Thu Sep 29 15:07:55 2011 -0700
+++ b/Swarm/src/FileParticleLayout.cxx	Fri Sep 30 14:38:20 2011 -0700
@@ -414,7 +414,7 @@ void _FileParticleLayout_InitialiseParti
                /* if we still cannot find the specified dataSpace, there is a problem */
                if(self->fileData[swarmVar_I][ii-1] < 0)
                      Journal_Firewall( 
-                        NULL, 
+                        false,
                         self->errorStream,
                         "\n\nError in %s for %s '%s' \n Cannot open dataSpace for checkpointed swarmvariable (%s) that requries reloading.\n  Checkpoint files may be invalid.\n\n", 
                         __func__, 
@@ -478,8 +478,8 @@ void _FileParticleLayout_InitialiseParti
 {
    FileParticleLayout*	self = (FileParticleLayout*)particleLayout;
    Swarm*					swarm = (Swarm*)_swarm;
-   SizeT						particleSize; 
    int						result;
+   SizeT             particleSize; 
 
 #ifdef READ_HDF5
    SwarmVariable*    swarmVar;
diff -r 23b72f3e8b3a -r a09d9037dfc0 Swarm/src/GaussBorderParticleLayout.cxx
--- a/Swarm/src/GaussBorderParticleLayout.cxx	Thu Sep 29 15:07:55 2011 -0700
+++ b/Swarm/src/GaussBorderParticleLayout.cxx	Fri Sep 30 14:38:20 2011 -0700
@@ -321,10 +321,7 @@ void _GaussBorderParticleLayout_Initiali
   above to be generalised and not consist of a largish switch-case statement.
 */
 Dimension_Index GaussBorderParticleLayout_GetFaceAxis( void* gaussBorderParticleLayout, Index face_I, Dimension_Index axis) {
-	GaussBorderParticleLayout*	self;
 	Dimension_Index				faceAxes3D[6][3];
-
-	self = (GaussBorderParticleLayout*)gaussBorderParticleLayout;
 
 	faceAxes3D[0][ I_AXIS ] = I_AXIS; faceAxes3D[0][ J_AXIS ] = K_AXIS; faceAxes3D[0][ K_AXIS ] = J_AXIS;
 	faceAxes3D[1][ I_AXIS ] = I_AXIS; faceAxes3D[1][ J_AXIS ] = K_AXIS; faceAxes3D[1][ K_AXIS ] = J_AXIS;



More information about the CIG-COMMITS mailing list