diff options
author | Niklas Söderlund <niklas.soderlund@ragnatech.se> | 2019-06-26 19:25:58 +0200 |
---|---|---|
committer | Niklas Söderlund <niklas.soderlund@ragnatech.se> | 2019-06-30 13:49:52 +0200 |
commit | 0116a940ba0232b625ab84bb90bb1bc3ddd47658 (patch) | |
tree | e82121bfbc83e1e07a6313e3f0f1232e27795567 /meson.build | |
parent | 6948ec44c7f77fbd34283bfef7a661bd0d3c991d (diff) |
libcamera: v4l2_device: Fix variable-sized object initialization
Compiling with clang renders errors as a variable-sized arrays are not
allowed to be initialized. Solve this by using memset() for v4l2Ctrls
which is the only one of the two arrays that needs to be zeroed.
../../src/libcamera/v4l2_device.cpp:155:37: error: variable-sized object may not be initialized
const V4L2ControlInfo *controlInfo[count] = {};
^~~~~
../../src/libcamera/v4l2_device.cpp:156:36: error: variable-sized object may not be initialized
struct v4l2_ext_control v4l2Ctrls[count] = {};
^~~~~
../../src/libcamera/v4l2_device.cpp:227:37: error: variable-sized object may not be initialized
const V4L2ControlInfo *controlInfo[count] = {};
^~~~~
../../src/libcamera/v4l2_device.cpp:228:36: error: variable-sized object may not be initialized
struct v4l2_ext_control v4l2Ctrls[count] = {};
^~~~~
Fixes: eb068f4e67eedacd ("libcamera: v4l2_device: Implement get and set controls")
Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'meson.build')
0 files changed, 0 insertions, 0 deletions