[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH gnumach 15/16] Honour type promotion on variable argument handlin
From: |
Guillem Jover |
Subject: |
[PATCH gnumach 15/16] Honour type promotion on variable argument handling |
Date: |
Tue, 30 Aug 2011 03:09:41 +0200 |
* linux/dev/lib/vsprintf.c (linux_vsprintf): Use `int' when retrieving
a `short' through `va_arg'.
---
linux/dev/lib/vsprintf.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/linux/dev/lib/vsprintf.c b/linux/dev/lib/vsprintf.c
index 0beb747..541ec65 100644
--- a/linux/dev/lib/vsprintf.c
+++ b/linux/dev/lib/vsprintf.c
@@ -328,9 +328,9 @@ linux_vsprintf (char *buf, const char *fmt, va_list args)
num = va_arg (args, unsigned long);
else if (qualifier == 'h')
if (flags & SIGN)
- num = va_arg (args, short);
+ num = (short) va_arg (args, int);
else
- num = va_arg (args, unsigned short);
+ num = (unsigned short) va_arg (args, unsigned int);
else if (flags & SIGN)
num = va_arg (args, int);
else
--
1.7.5.4
- [PATCH gnumach 04/16] Cast host_get_time() arguments to fix warnings, (continued)
- [PATCH gnumach 04/16] Cast host_get_time() arguments to fix warnings, Guillem Jover, 2011/08/29
- [PATCH gnumach 16/16] Fix undefined operation on assigning self pre-incremented variable, Guillem Jover, 2011/08/29
- [PATCH gnumach 06/16] Add missing headers, Guillem Jover, 2011/08/29
- [PATCH gnumach 10/16] Import Linux 3.1 ctype code, Guillem Jover, 2011/08/29
- [PATCH gnumach 09/16] Remove unused and non-functional string specialization header, Guillem Jover, 2011/08/29
- [PATCH gnumach 15/16] Honour type promotion on variable argument handling,
Guillem Jover <=
- [PATCH gnumach 11/16] Import Linux 3.1 compiler definitions, Guillem Jover, 2011/08/29
- Re: [PATCH gnumach 00/16] Another round of warning fixes, Samuel Thibault, 2011/08/30