diff options
author | Jeremy Allison <jra@samba.org> | 1998-10-28 18:26:04 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1998-10-28 18:26:04 +0000 |
commit | e3cfbdd88bd7522ad7f62636d4f924b737c89688 (patch) | |
tree | edc76ec9b79adf6c66b9bdfcff29dd303b55623c /source3/lib | |
parent | 94f7ce7624c22ce735c7b0f9a7079f41ac248af5 (diff) | |
download | samba-e3cfbdd88bd7522ad7f62636d4f924b737c89688.tar.gz samba-e3cfbdd88bd7522ad7f62636d4f924b737c89688.tar.bz2 samba-e3cfbdd88bd7522ad7f62636d4f924b737c89688.zip |
Fixes to allow this to pass SGI compiler in -fullwarn mode (with one
annoying exception I'm still looking at :-).
Jeremy.
(This used to be commit 9cade656e2db743cb6ee67bbb8b0f50e8e4c39f9)
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/snprintf.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/source3/lib/snprintf.c b/source3/lib/snprintf.c index 467f914244..b98a12cf4f 100644 --- a/source3/lib/snprintf.c +++ b/source3/lib/snprintf.c @@ -278,9 +278,9 @@ static void dopr (char *buffer, size_t maxlen, const char *format, va_list args) if (cflags == DP_C_SHORT) value = va_arg (args, unsigned short int); else if (cflags == DP_C_LONG) - value = va_arg (args, unsigned long int); + value = (long)va_arg (args, unsigned long int); else - value = va_arg (args, unsigned int); + value = (long)va_arg (args, unsigned int); fmtint (buffer, &currlen, maxlen, value, 8, min, max, flags); break; case 'u': @@ -288,9 +288,9 @@ static void dopr (char *buffer, size_t maxlen, const char *format, va_list args) if (cflags == DP_C_SHORT) value = va_arg (args, unsigned short int); else if (cflags == DP_C_LONG) - value = va_arg (args, unsigned long int); + value = (long)va_arg (args, unsigned long int); else - value = va_arg (args, unsigned int); + value = (long)va_arg (args, unsigned int); fmtint (buffer, &currlen, maxlen, value, 10, min, max, flags); break; case 'X': @@ -300,9 +300,9 @@ static void dopr (char *buffer, size_t maxlen, const char *format, va_list args) if (cflags == DP_C_SHORT) value = va_arg (args, unsigned short int); else if (cflags == DP_C_LONG) - value = va_arg (args, unsigned long int); + value = (long)va_arg (args, unsigned long int); else - value = va_arg (args, unsigned int); + value = (long)va_arg (args, unsigned int); fmtint (buffer, &currlen, maxlen, value, 16, min, max, flags); break; case 'f': @@ -353,7 +353,7 @@ static void dopr (char *buffer, size_t maxlen, const char *format, va_list args) { long int *num; num = va_arg (args, long int *); - *num = currlen; + *num = (long int)currlen; } else { @@ -547,7 +547,7 @@ static long round (LDOUBLE value) { long intpart; - intpart = value; + intpart = (long)value; value = value - intpart; if (value >= 0.5) intpart++; @@ -592,7 +592,7 @@ static void fmtfp (char *buffer, size_t *currlen, size_t maxlen, if (flags & DP_F_UP) caps = 1; /* Should characters be upper case? */ #endif - intpart = ufvalue; + intpart = (long)ufvalue; /* * Sorry, we only support 9 digits past the decimal because of our |