From 444b4712ca260f04680a5c0a4818f0dfe83073d6 Mon Sep 17 00:00:00 2001 From: eschnett Date: Thu, 22 Nov 2012 03:32:21 +0000 Subject: Clean up code #ifdef out unused variable. Initialise invalid pointer with NULL. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGHInterp/trunk@106 1c20744c-e24a-42ec-9533-f5004cb800e5 --- src/InterpGridArrays.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/InterpGridArrays.c b/src/InterpGridArrays.c index 37af0dc..9a0cf7f 100644 --- a/src/InterpGridArrays.c +++ b/src/InterpGridArrays.c @@ -309,7 +309,10 @@ PUGHInterp_DriverInterpolate (CCTK_POINTER_TO_CONST const GH_, CCTK_POINTER const output_arrays []) { cGH const * restrict const GH = GH_; - int i, suppress_warnings, retval; + int i, retval; +#if 0 + int suppress_warnings; +#endif CCTK_REAL *origin_local, *delta; CCTK_INT *input_array_dims, *input_array_types, *input_array_time_levels; const void **input_arrays; @@ -333,10 +336,12 @@ PUGHInterp_DriverInterpolate (CCTK_POINTER_TO_CONST const GH_, #endif +#if 0 /* check for a "suppress_warnings" key in the parameter table to find out whether we should print warnings or not */ suppress_warnings = Util_TableQueryValueInfo (param_table_handle, NULL, NULL, "suppress_warnings") == 1; +#endif pughGH = CCTK_GHExtension (GH, "PUGH"); @@ -1126,8 +1131,7 @@ PUGHInterp_DriverInterpolate (CCTK_POINTER_TO_CONST const GH_, set the buffer pointer to an invalid but non-NULL value otherwise we might get trouble with NULL pointers in MPI_Alltoallv () */ - /* dereferencing such an address should code crash on most systems */ - this->sendbuf = this->recvbuf = (void *) this->vtypesize; + this->sendbuf = this->recvbuf = NULL; /* here goes the allocation for the send buffer, along with copying the results from the intermediate local output arrays */ -- cgit v1.2.3