summaryrefslogtreecommitdiff
path: root/usr/src/common/util
diff options
context:
space:
mode:
authormyers <none@none>2005-11-18 16:47:42 -0800
committermyers <none@none>2005-11-18 16:47:42 -0800
commitfc77c2683a49f56e308f395ccaa03e52265d8c2d (patch)
treeea9b6baadd8e7db31a24bfbc0c8b30858cc69243 /usr/src/common/util
parentf47a9c508408507a404eaf38dd597e6ac41f92e6 (diff)
downloadillumos-gate-fc77c2683a49f56e308f395ccaa03e52265d8c2d.tar.gz
6352490 gcc and vsnprintf: some changes in 6333936 annoy gcc
Diffstat (limited to 'usr/src/common/util')
-rw-r--r--usr/src/common/util/string.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/usr/src/common/util/string.c b/usr/src/common/util/string.c
index fe2388925d..e786b5d117 100644
--- a/usr/src/common/util/string.c
+++ b/usr/src/common/util/string.c
@@ -164,7 +164,7 @@ next_fmt:
base = 1;
break;
case 'c':
- c = (char)va_arg(args, char);
+ c = (char)va_arg(args, int);
ADDCHAR(c);
break;
case 's':
@@ -229,14 +229,16 @@ next_fmt:
ul = (int64_t)va_arg(args, unsigned long);
else if (h_count > 1)
if (sign)
- ul = (int64_t)va_arg(args, char);
+ ul = (int64_t)((char)va_arg(args, int));
else
- ul = (int64_t)va_arg(args, unsigned char);
+ ul = (int64_t)((unsigned char)va_arg(args,
+ int));
else if (h_count > 0)
if (sign)
- ul = (int64_t)va_arg(args, short);
+ ul = (int64_t)((short)va_arg(args, int));
else
- ul = (int64_t)va_arg(args, unsigned short);
+ ul = (int64_t)((unsigned short)va_arg(args,
+ int));
if (sign && (int64_t)ul < 0)
ul = -ul;