Browse Source

attract gcc's attention to some printf format strings (for type checking)

pre-master-46
rlar 16 years ago
parent
commit
d602e0b75c
  1. 7
      ChangeLog
  2. 6
      src/ciderlib/oned/oneprint.c
  3. 4
      src/ciderlib/support/globals.c
  4. 4
      src/ciderlib/support/mater.c
  5. 6
      src/ciderlib/twod/twoprint.c

7
ChangeLog

@ -1,3 +1,10 @@
2010-11-23 Robert Larice
* src/ciderlib/oned/oneprint.c ,
* src/ciderlib/support/globals.c ,
* src/ciderlib/support/mater.c ,
* src/ciderlib/twod/twoprint.c :
attract gcc's attention to some printf format strings (for type checking)
2010-11-23 Robert Larice
* src/frontend/inpcom.c ,
* src/frontend/plotting/grid.c :

6
src/ciderlib/oned/oneprint.c

@ -326,8 +326,8 @@ struct MatrixElement {
void
ONEmemStats(FILE *file, ONEdevice *pDevice)
{
static char *memFormat = "%-20s%10d%10d\n";
/* static char *sumFormat = "%20s %-10d\n";*/
static const char memFormat[] = "%-20s%10d%10d\n";
/* static const char sumFormat[] = "%20s %-10d\n";*/
unsigned int size;
unsigned int memory;
ONEmaterial *pMaterial;
@ -405,7 +405,7 @@ ONEmemStats(FILE *file, ONEdevice *pDevice)
void
ONEcpuStats(FILE *file, ONEdevice *pDevice)
{
static char *cpuFormat = "%-20s%10g%10g%10g%10g%10g\n";
static const char cpuFormat[] = "%-20s%10g%10g%10g%10g%10g\n";
ONEstats *pStats = pDevice->pStats;
double total;
int iTotal;

4
src/ciderlib/support/globals.c

@ -132,8 +132,8 @@ void GLOBgetGlobals(GLOBvalues *values)
void GLOBprnGlobals(FILE *file, GLOBvalues *values)
{
static char *tabformat = "%12s: % .4e %-12s\t";
static char *newformat = "%12s: % .4e %-12s\n";
static const char tabformat[] = "%12s: % .4e %-12s\t";
static const char newformat[] = "%12s: % .4e %-12s\n";
if ( values == NIL( GLOBvalues ) ) {
fprintf( stderr, "Error: tried to print NIL GLOBvalues\n");

4
src/ciderlib/support/mater.c

@ -277,8 +277,8 @@ MATLtempDep(MaterialInfo *info, double tnom)
void
printMaterialInfo(MaterialInfo *info)
{
static char *tabformat = "%12s: % .4e %-12s\t";
static char *newformat = "%12s: % .4e %-12s\n";
static const char tabformat[] = "%12s: % .4e %-12s\t";
static const char newformat[] = "%12s: % .4e %-12s\n";
char *name;

6
src/ciderlib/twod/twoprint.c

@ -344,8 +344,8 @@ struct MatrixElement
void
TWOmemStats(FILE *file, TWOdevice *pDevice)
{
static char *memFormat = "%-20s%10d%10d\n";
/* static char *sumFormat = "%20s %-10d\n"; */
static const char memFormat[] = "%-20s%10d%10d\n";
/* static const char sumFormat[] = "%20s %-10d\n"; */
unsigned int size;
unsigned int memory;
TWOmaterial *pMaterial;
@ -432,7 +432,7 @@ TWOmemStats(FILE *file, TWOdevice *pDevice)
void
TWOcpuStats(FILE *file, TWOdevice *pDevice)
{
static char *cpuFormat = "%-20s%10g%10g%10g%10g%10g\n";
static const char cpuFormat[] = "%-20s%10g%10g%10g%10g%10g\n";
TWOstats *pStats = pDevice->pStats;
double total;
int iTotal;

Loading…
Cancel
Save