linux/drivers/media
Gustavo A. R. Silva c8efa2c826 media: rc: iguanair: Replace zero-length array with flexible-array member
The current codebase makes use of the zero-length array language
extension to the C90 standard, but the preferred mechanism to declare
variable-length types such as these ones is a flexible array member[1][2],
introduced in C99:

struct foo {
        int stuff;
        struct boo array[];
};

By making use of the mechanism above, we will get a compiler warning
in case the flexible array does not occur last in the structure, which
will help us prevent some kind of undefined behavior bugs from being
inadvertently introduced[3] to the codebase from now on.

This issue was found with the help of Coccinelle.

[1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html
[2] https://github.com/KSPP/linux/issues/21
[3] commit 7649773293 ("cxgb3/l2t: Fix undefined behaviour")

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-03-02 10:47:07 +01:00
..
cec media: cec: remove unused functions 2020-01-08 14:38:06 +01:00
common media: media/common/saa7146: rename VFL_TYPE_GRABBER to _VIDEO 2020-02-24 16:53:30 +01:00
dvb-core media: dvb-core: dvbdev: convert to use i2c_new_client_device() 2020-01-09 15:57:46 +01:00
dvb-frontends media: drxj: remove redundant assignments to variable rc 2020-02-24 16:26:14 +01:00
firewire media: firewire: Make structure fdtv_ca constant 2019-08-21 18:39:55 -03:00
i2c media: smiapp: Move definitions under driver directory 2020-02-27 17:49:04 -03:00
mc media: mc-entity.c: use WARN_ON, validate link pads 2020-02-24 17:21:58 +01:00
mmc treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
pci media: media/pci: rename VFL_TYPE_GRABBER to _VIDEO 2020-02-24 16:53:50 +01:00
platform media: vsp1: tidyup VI6_HGT_LBn_H() macro 2020-02-27 17:49:48 -03:00
radio media: Fix Kconfig indentation 2020-02-24 15:19:38 +01:00
rc media: rc: iguanair: Replace zero-length array with flexible-array member 2020-03-02 10:47:07 +01:00
spi media: Clarify how menus are hidden by SUBDRV_AUTOSELECT 2019-08-19 12:00:29 -03:00
tuners media: tuners: Use the correct style for SPDX License Identifier 2019-10-24 18:57:55 -03:00
usb media: media/usb: rename VFL_TYPE_GRABBER to _VIDEO 2020-02-24 16:53:16 +01:00
v4l2-core media: rename VFL_TYPE_GRABBER to _VIDEO 2020-02-24 16:52:39 +01:00
Kconfig media: Fix Kconfig indentation 2020-02-24 15:19:38 +01:00
Makefile media: move drivers/media/media-* to drivers/media/mc/mc-* 2019-05-28 12:15:46 -04:00