Commit a2ae6da0 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by David S. Miller

peak_usb: fix clang build warning

Clang points out undefined behavior when building the pcan_usb_pro driver:

drivers/net/can/usb/peak_usb/pcan_usb_pro.c:136:15: error: passing an object that undergoes default argument promotion to 'va_start' has undefined behavior [-Werror,-Wvarargs]

Changing the function prototype to avoid argument promotion in the
varargs call avoids the warning, and should make this well-defined.
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Reviewed-by: default avatarNathan Chancellor <natechancellor@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ae9819e3
...@@ -127,7 +127,7 @@ static u8 *pcan_msg_init_empty(struct pcan_usb_pro_msg *pm, ...@@ -127,7 +127,7 @@ static u8 *pcan_msg_init_empty(struct pcan_usb_pro_msg *pm,
/* /*
* add one record to a message being built * add one record to a message being built
*/ */
static int pcan_msg_add_rec(struct pcan_usb_pro_msg *pm, u8 id, ...) static int pcan_msg_add_rec(struct pcan_usb_pro_msg *pm, int id, ...)
{ {
int len, i; int len, i;
u8 *pc; u8 *pc;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment