isdn: capi: fix mismatched prototypes
Subsystems (2)
PATCH 1/1 isdn: capi: fix mismatched prototypes
From: Arnd Bergmann <[email protected]>
gcc-11 complains about a prototype declaration that is different from the function definition:
drivers/isdn/capi/kcapi.c:724:44: error: argument 2 of type ‘u8 *’ {aka ‘unsigned char *’} declared as a pointer [-Werror=array-parameter=]
724 | u16 capi20_get_manufacturer(u32 contr, u8 *buf)
| ~~~~^~~
In file included from drivers/isdn/capi/kcapi.c:13:drivers/isdn/capi/kcapi.h:62:43: note: previously declared as an array ‘u8[64]’ {aka ‘unsigned char[64]’}
62 | u16 capi20_get_manufacturer(u32 contr, u8 buf[CAPI_MANUFACTURER_LEN]);
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~drivers/isdn/capi/kcapi.c:790:38: error: argument 2 of type ‘u8 *’ {aka ‘unsigned char *’} declared as a pointer [-Werror=array-parameter=]
790 | u16 capi20_get_serial(u32 contr, u8 *serial)
| ~~~~^~~~~~
In file included from drivers/isdn/capi/kcapi.c:13:drivers/isdn/capi/kcapi.h:64:37: note: previously declared as an array ‘u8[8]’ {aka ‘unsigned char[8]’}
64 | u16 capi20_get_serial(u32 contr, u8 serial[CAPI_SERIAL_LEN]);
| ~~~^~~~~~~~~~~~~~~~~~~~~~~Change the definition to make them match.
--- drivers/isdn/capi/kcapi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/isdn/capi/kcapi.c +2 -2
@@ -721,7 +721,7 @@ u16 capi20_put_message(struct capi20_appl *ap, struct sk_buff *skb)* Return value: CAPI result code */ -u16 capi20_get_manufacturer (u32 contr,u8 *buf) +u16 capi20_get_manufacturer (u32 contr,u8 buf[CAPI_MANUFACTURER_LEN ]) {struct capi_ctr *ctr;u16 ret;
@@ -787,7 +787,7 @@ u16 capi20_get_version(u32 contr, struct capi_version *verp)* Return value: CAPI result code */ -u16 capi20_get_serial (u32 contr,u8 *serial) +u16 capi20_get_serial (u32 contr,u8 serial[CAPI_SERIAL_LEN ]) {struct capi_ctr *ctr;u16 ret;
Signature · 1 line
2.29.2
This patch was applied to netdev/net.git (refs/heads/master):
Hello:
This patch was applied to netdev/net.git (refs/heads/master):
Quoted 17 lines · On Mon, 22 Mar 2021 17:44:29 +0100 you wrote:
From: Arnd Bergmann <[email protected]>
gcc-11 complains about a prototype declaration that is different from the function definition:
drivers/isdn/capi/kcapi.c:724:44: error: argument 2 of type ‘u8 *’ {aka ‘unsigned char *’} declared as a pointer [-Werror=array-parameter=]
724 | u16capi20_get_manufacturer(u32 contr, u8 *buf)
| ~~~~^~~
In file included fromdrivers/isdn/capi/kcapi.c:13:drivers/isdn/capi/kcapi.h:62:43: note: previously declared as an array ‘u8[64]’ {aka ‘unsigned char[64]’}62 | u16 capi20_get_manufacturer(u32 contr, u8 buf[CAPI_MANUFACTURER_LEN]); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/isdn/capi/kcapi.c:790:38: error: argument 2 of type ‘u8 *’ {aka ‘unsigned char *’} declared as a pointer [-Werror=array-parameter=]
790 | u16capi20_get_serial(u32 contr, u8 *serial)
| ~~~~^~~~~~
In file included fromdrivers/isdn/capi/kcapi.c:13:drivers/isdn/capi/kcapi.h:64:37: note: previously declared as an array ‘u8[8]’ {aka ‘unsigned char[8]’}
Quoted 4 lines
64 | u16 capi20_get_serial(u32 contr, u8 serial[CAPI_SERIAL_LEN]); | ~~~^~~~~~~~~~~~~~~~~~~~~~~[...]
Here is the summary with links:
- isdn: capi: fix mismatched prototypes
https://git.kernel.org/netdev/net/c/5ee7d4c7fbc9
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html