From 5876f3c0fa5d4806fa09537e66f644eee2b4c5ec Mon Sep 17 00:00:00 2001 From: tradke Date: Tue, 9 Apr 2002 20:10:10 +0000 Subject: Removed unused local variable. git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/IOBasic/trunk@119 b589c3ab-70e8-4b4d-a09f-cba2dd200880 --- src/WriteScalar.c | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) (limited to 'src') diff --git a/src/WriteScalar.c b/src/WriteScalar.c index 12083de..272a9fe 100644 --- a/src/WriteScalar.c +++ b/src/WriteScalar.c @@ -2,9 +2,10 @@ @routine WriteScalar.c @date 18th September 1999 @author Gabrielle Allen - @desc + @desc Dumps data for IOBasic's "Scalar" I/O method to output files - @enddesc + @enddesc + @version $Id$ @@*/ #include @@ -84,17 +85,17 @@ int IOBasic_WriteScalar (const cGH *GH, int vindex, const char *alias) { fullname = CCTK_FullName (vindex); CCTK_VWarn (2, __LINE__, __FILE__, CCTK_THORNSTRING, - "IOBasic_WriteScalar: No scalar output for '%s' (no storage)", + "IOBasic_WriteScalar: No scalar output for '%s' (no storage)", fullname); free (fullname); retval = -1; } else if (CCTK_GroupTypeFromVarI (vindex) == CCTK_SCALAR) - { + { retval = IOBasic_WriteScalarGS (GH, vindex, alias); } else - { + { retval = IOBasic_WriteScalarGA (GH, vindex, alias); } @@ -146,11 +147,6 @@ static int IOBasic_WriteScalarGA (const cGH *GH, int vindex, const char *alias) char format_str[15]; const char *file_extension; iobasic_reduction_t *reduction; - union - { - char *non_const_ptr; - const char *const_ptr; - } reductions; /*** FIXME: can CCTK_Reduce() have a 'const cGH *' parameter ?? ***/ union { @@ -162,7 +158,6 @@ static int IOBasic_WriteScalarGA (const cGH *GH, int vindex, const char *alias) /* this union helps us to avoid compiler warning about discarding the const qualifier from a pointer target type */ - reductions.const_ptr = outScalar_reductions; GH_fake_const.const_ptr = GH; /* set output format */ @@ -243,7 +238,7 @@ static int IOBasic_WriteScalarGA (const cGH *GH, int vindex, const char *alias) else { CCTK_VWarn (1, __LINE__, __FILE__, CCTK_THORNSTRING, - "IOBasic_WriteScalarGA: Could not open output file '%s'", + "IOBasic_WriteScalarGA: Could not open output file '%s'", filename); } free (filename); @@ -303,7 +298,7 @@ static int IOBasic_WriteScalarGS (const cGH *GH, int vindex, const char *alias) /* output is done by processor 0 only */ - if (CCTK_MyProc (GH) != 0) + if (CCTK_MyProc (GH) != 0) { return (0); } @@ -335,7 +330,7 @@ static int IOBasic_WriteScalarGS (const cGH *GH, int vindex, const char *alias) if (file) { /* get the data pointer */ - data = CCTK_VarDataPtrI (GH, 0, vindex); + data = CCTK_VarDataPtrI (GH, 0, vindex); switch (CCTK_VarTypeI (vindex)) { @@ -379,7 +374,7 @@ static FILE *OpenScalarFile (const cGH *GH, DECLARE_CCTK_PARAMETERS FILE *file; char comment_char, buffer[128]; - ioAdvertisedFileDesc advertised_file; + ioAdvertisedFileDesc advertised_file; iobasicGH *myGH; char *openmode, *fullname; struct stat fileinfo; @@ -410,7 +405,7 @@ static FILE *OpenScalarFile (const cGH *GH, file = fopen (filename, openmode); if (file && *openmode == 'w') { - if (CCTK_Equals (outScalar_style, "gnuplot")) + if (CCTK_Equals (outScalar_style, "gnuplot")) { comment_char = '#'; advertised_file.mimetype = "application/gnuplot"; -- cgit v1.2.3