diff options
author | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2001-06-23 10:46:21 +0000 |
---|---|---|
committer | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2001-06-23 10:46:21 +0000 |
commit | 334456c26052c4a422287d4e3ea996a06606ac2a (patch) | |
tree | 4f1e8ecd98d0ab370458dfe4fde0522746709a4d | |
parent | f30148238a6a149fe9da8650f190e77c921baaf3 (diff) |
Fixed type conversions for gcc 3.0 .
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2247 17b73243-c579-4c4c-a9d2-2d5706c11dac
-rw-r--r-- | src/util/snprintf.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/util/snprintf.c b/src/util/snprintf.c index 99d4b64a..458338fd 100644 --- a/src/util/snprintf.c +++ b/src/util/snprintf.c @@ -56,6 +56,10 @@ * Tom Goodale <goodale@aei-potsdam.mpg.de> 2001-05-24 * Put into CCTK * + * Tom Goodale <goodale@aei-potsdam.mpg.de> 2001-06-23 + * Short ints get promoted to ints by compiler, so changed args to va_arg + * to reflect this. + * **************************************************************/ @@ -285,7 +289,7 @@ static int dopr (char *buffer, size_t maxlen, const char *format, va_list args) case 'd': case 'i': if (cflags == DP_C_SHORT) - value = va_arg (args, short int); + value = va_arg (args, int); else if (cflags == DP_C_LONG) value = va_arg (args, long int); else @@ -295,7 +299,7 @@ static int dopr (char *buffer, size_t maxlen, const char *format, va_list args) case 'o': flags |= DP_F_UNSIGNED; if (cflags == DP_C_SHORT) - value = va_arg (args, unsigned short int); + value = va_arg (args, unsigned int); else if (cflags == DP_C_LONG) value = va_arg (args, unsigned long int); else @@ -305,7 +309,7 @@ static int dopr (char *buffer, size_t maxlen, const char *format, va_list args) case 'u': flags |= DP_F_UNSIGNED; if (cflags == DP_C_SHORT) - value = va_arg (args, unsigned short int); + value = va_arg (args, unsigned int); else if (cflags == DP_C_LONG) value = va_arg (args, unsigned long int); else @@ -317,7 +321,7 @@ static int dopr (char *buffer, size_t maxlen, const char *format, va_list args) case 'x': flags |= DP_F_UNSIGNED; if (cflags == DP_C_SHORT) - value = va_arg (args, unsigned short int); + value = va_arg (args, unsigned int); else if (cflags == DP_C_LONG) value = va_arg (args, unsigned long int); else |