aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortradke <tradke@b589c3ab-70e8-4b4d-a09f-cba2dd200880>2002-04-09 20:10:10 +0000
committertradke <tradke@b589c3ab-70e8-4b4d-a09f-cba2dd200880>2002-04-09 20:10:10 +0000
commit5876f3c0fa5d4806fa09537e66f644eee2b4c5ec (patch)
tree30d58882a0ffe2523f271e3176f05f15e96f1be9 /src
parent97c8567e5aa4e21cdb326b6c7fbf8a0f86ba14ad (diff)
Removed unused local variable.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/IOBasic/trunk@119 b589c3ab-70e8-4b4d-a09f-cba2dd200880
Diffstat (limited to 'src')
-rw-r--r--src/WriteScalar.c27
1 files changed, 11 insertions, 16 deletions
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 <ctype.h>
@@ -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";