Skip to contentSkip to conversation

media: dvb-usb-remote: fix dvb_usb_nec_rc_key_to_event type mismatch

PATCH New Arnd Bergmann 1 participant 1 message Mar 22, 2021 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 media: dvb-usb-remote: fix dvb_usb_nec_rc_key_to_event type mismatch

From: Arnd Bergmann <[email protected]>

gcc-11 warns about the prototype not exactly matching the function definition:

drivers/media/usb/dvb-usb/dvb-usb-remote.c:363:20: error: argument 2 of type ‘u8[5]’ {aka ‘unsigned char[5]’} with mismatched bound [-Werror=array-parameter=]

  363 |                 u8 keybuf[5], u32 *event, int *state)
      |                 ~~~^~~~~~~~~

In file included from drivers/media/usb/dvb-usb/dvb-usb-common.h:13,
from drivers/media/usb/dvb-usb/dvb-usb-remote.c:9:
drivers/media/usb/dvb-usb/dvb-usb.h:490:65: note: previously declared as ‘u8[]’ {aka ‘unsigned char[]’}
490 | extern int dvb_usb_nec_rc_key_to_event(struct dvb_usb_device *, u8[], u32 *, int *);
| ^~~~

Fixes 776338e121b9 ("[PATCH] dvb: Add generalized dvb-usb driver")
---
 drivers/media/usb/dvb-usb/dvb-usb.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/usb/dvb-usb/dvb-usb.h +1 -1
index 52407fc28c03..42f4d2fece8b 100644
@@ -487,7 +487,7 @@ extern int __must_check
 dvb_usb_generic_write(struct dvb_usb_device *, u8 *, u16);
 
 /* commonly used remote control parsing */
-extern int dvb_usb_nec_rc_key_to_event(struct dvb_usb_device *, u8[], u32 *, int *);
+extern int dvb_usb_nec_rc_key_to_event(struct dvb_usb_device *, u8[5], u32 *, int *);
 
 /* commonly used firmware download types and function */
 struct hexline {
Signature · 1 line
2.29.2