[cig-commits] commit: Fix warnings
Mercurial
hg at geodynamics.org
Thu Mar 15 12:36:14 PDT 2012
changeset: 923:1381d93b2f6f
user: Walter Landry <wlandry at caltech.edu>
date: Thu Mar 15 12:35:49 2012 -0700
files: Rheology/src/Director.cxx Utils/src/BaseRecoveryFeVar.cxx plugins/EulerDeform/EulerDeform.cxx plugins/HRS_Erosion/HRS_Erosion.cxx plugins/SurfaceProcess/SurfaceProcess.cxx
description:
Fix warnings
diff -r 635c0b86f8be -r 1381d93b2f6f Rheology/src/Director.cxx
--- a/Rheology/src/Director.cxx Sat Nov 26 20:50:52 2011 -0800
+++ b/Rheology/src/Director.cxx Thu Mar 15 12:35:49 2012 -0700
@@ -475,7 +475,6 @@ Bool _Director_TimeDerivative( void* dir
double* normal;
MaterialPoint* materialPoint = (MaterialPoint*) Swarm_ParticleAt( materialPointsSwarm, lParticle_I );
Director_ParticleExt* particleExt;
- InterpolationResult result;
/* Get particle extension info - this will contain vector with director */
particleExt = (Director_ParticleExt*) ExtensionManager_Get( materialPointsSwarm->particleExtensionMgr,
@@ -489,7 +488,11 @@ Bool _Director_TimeDerivative( void* dir
normal = particleExt->director;
- result = FieldVariable_InterpolateValueAt( self->velGradField, materialPoint->coord, velGrad );
+#ifdef DEBUG
+ InterpolationResult result;
+ result =
+#endif
+ FieldVariable_InterpolateValueAt( self->velGradField, materialPoint->coord, velGrad );
/* if in debug mode, perform some tests */
#ifdef DEBUG
if ( result == OTHER_PROC || result == OUTSIDE_GLOBAL || isinf(velGrad[0]) || isinf(velGrad[1]) ||
diff -r 635c0b86f8be -r 1381d93b2f6f Utils/src/BaseRecoveryFeVar.cxx
--- a/Utils/src/BaseRecoveryFeVar.cxx Sat Nov 26 20:50:52 2011 -0800
+++ b/Utils/src/BaseRecoveryFeVar.cxx Thu Mar 15 12:35:49 2012 -0700
@@ -17,6 +17,7 @@ void* _BaseRecoveryFeVar_DefaultNew( Nam
void* _BaseRecoveryFeVar_DefaultNew( Name name ) {
/* this is an abstract call so this function should never be called */
assert(0);
+ return NULL;
}
BaseRecoveryFeVar* _BaseRecoveryFeVar_New( BASERECOVERYFEVAR_DEFARGS )
{
diff -r 635c0b86f8be -r 1381d93b2f6f plugins/EulerDeform/EulerDeform.cxx
--- a/plugins/EulerDeform/EulerDeform.cxx Sat Nov 26 20:50:52 2011 -0800
+++ b/plugins/EulerDeform/EulerDeform.cxx Thu Mar 15 12:35:49 2012 -0700
@@ -441,11 +441,8 @@ void _Underworld_EulerDeform_Build(void*
void _Underworld_EulerDeform_Destroy( void* component, void* data ) {
- Codelet* ed = (Codelet*)component;
- UnderworldContext* uwCtx = (UnderworldContext*)ed->context;
-
assert( component );
- assert( uwCtx );
+ assert( (UnderworldContext*)((Codelet*)component)->context );
/* Clear the lot. */
/* TODO */
diff -r 635c0b86f8be -r 1381d93b2f6f plugins/HRS_Erosion/HRS_Erosion.cxx
--- a/plugins/HRS_Erosion/HRS_Erosion.cxx Sat Nov 26 20:50:52 2011 -0800
+++ b/plugins/HRS_Erosion/HRS_Erosion.cxx Thu Mar 15 12:35:49 2012 -0700
@@ -392,10 +392,8 @@ void _Underworld_HRS_Erosion_Build( void
}
void _Underworld_HRS_Erosion_Destroy( void* codelet, void* data ) {
- UnderworldContext* UnderworldCtx = (UnderworldContext*)data;
-
assert( codelet );
- assert( UnderworldCtx );
+ assert( (UnderworldContext*)data );
/* Clear the lot. */
/* TODO */
diff -r 635c0b86f8be -r 1381d93b2f6f plugins/SurfaceProcess/SurfaceProcess.cxx
--- a/plugins/SurfaceProcess/SurfaceProcess.cxx Sat Nov 26 20:50:52 2011 -0800
+++ b/plugins/SurfaceProcess/SurfaceProcess.cxx Thu Mar 15 12:35:49 2012 -0700
@@ -251,11 +251,8 @@ void _Underworld_SurfaceProcess_Build( v
}
void _Underworld_SurfaceProcess_Destroy( void* codelet, void* data ) {
- Codelet* ed=(Codelet*)codelet;
- UnderworldContext* uwCtx=(UnderworldContext*)ed->context;
-
assert( codelet );
- assert( uwCtx );
+ assert( (UnderworldContext*)((Codelet*)codelet)->context );
/* Clear the lot. */
/* TODO */
More information about the CIG-COMMITS
mailing list