diff options
author | Joel Stanley <joel@jms.id.au> | 2018-05-04 11:40:36 +0930 |
---|---|---|
committer | Stewart Smith <stewart@linux.ibm.com> | 2018-05-04 03:25:05 -0500 |
commit | 854bf69e1c7df94edd3b97266739623e85098496 (patch) | |
tree | 97f9a9bb9924427e8fad58f0af6633497e825d1c /hw/fsp | |
parent | cd2c3b097e21548788c2ffd82a428c62fdc929a7 (diff) | |
download | skiboot-854bf69e1c7df94edd3b97266739623e85098496.zip skiboot-854bf69e1c7df94edd3b97266739623e85098496.tar.gz skiboot-854bf69e1c7df94edd3b97266739623e85098496.tar.bz2 |
fsp: Fix msg vaargs usage
hw/fsp/fsp.c:1011:17: warning: passing an object that undergoes default argument promotion to
'va_start' has undefined behavior [-Wvarargs]
va_start(list, add_words);
^
hw/fsp/fsp.c:1007:59: note: parameter of type 'u8' (aka 'unsigned char') is declared here
void fsp_fillmsg(struct fsp_msg *msg, u32 cmd_sub_mod, u8 add_words, ...)
^
[CC] platforms/ibm-fsp/apollo-pci.o
hw/fsp/fsp.c:1026:17: warning: passing an object that undergoes default argument promotion to
'va_start' has undefined behavior [-Wvarargs]
va_start(list, add_words);
^
hw/fsp/fsp.c:1016:47: note: parameter of type 'u8' (aka 'unsigned char') is declared here
struct fsp_msg *fsp_mkmsg(u32 cmd_sub_mod, u8 add_words, ...)
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'hw/fsp')
-rw-r--r-- | hw/fsp/fsp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/fsp/fsp.c b/hw/fsp/fsp.c index 4a04d00..4beb330 100644 --- a/hw/fsp/fsp.c +++ b/hw/fsp/fsp.c @@ -1004,7 +1004,7 @@ static void __fsp_fillmsg(struct fsp_msg *msg, u32 cmd_sub_mod, va_end(list); } -void fsp_fillmsg(struct fsp_msg *msg, u32 cmd_sub_mod, u8 add_words, ...) +void fsp_fillmsg(struct fsp_msg *msg, u32 cmd_sub_mod, u32 add_words, ...) { va_list list; @@ -1013,7 +1013,7 @@ void fsp_fillmsg(struct fsp_msg *msg, u32 cmd_sub_mod, u8 add_words, ...) va_end(list); } -struct fsp_msg *fsp_mkmsg(u32 cmd_sub_mod, u8 add_words, ...) +struct fsp_msg *fsp_mkmsg(u32 cmd_sub_mod, u32 add_words, ...) { struct fsp_msg *msg = fsp_allocmsg(!!(cmd_sub_mod & 0x1000000)); va_list list; |