Silence the following warning by switching it of via a pragma.
| bcmserver.c: In function 'main':
| bcmserver.c:159:32: warning: unknown option after '#pragma GCC diagnostic' kind [-Wpragmas]
| 159 | #pragma GCC diagnostic ignored "-Wgnu-variable-sized-type-not-at-end"
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Silence the following warning by switching it of via a pragma.
| bcmserver.c:159:23: warning: field 'msg_head' with variable sized
| type 'struct bcm_msg_head' not at the end of a struct or class is a
| GNU extension [-Wgnu-variable-sized-type-not-at-end]
| struct bcm_msg_head msg_head;
| ^
As pointed out by Gary Bisson clang complains about unused variables in
some valid cases.
Reported-by: Gary Bisson <gary.bisson@boundarydevices.com>
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
The sscanf() function to parse bcmserver command strings limited the length of
the CAN netdevice name to six characters. With this patch the length is derived
from the IFNAMSIZ which defines the space in ifr.ifr_name.
Signed-off-by: Jiho Chu <jiho.chu@samsung.com>
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>