You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ma...@apache.org on 2020/06/14 23:10:58 UTC
[incubator-nuttx] 01/02: drivers: video: fix uninitialized variables
This is an automated email from the ASF dual-hosted git repository.
masayuki pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 8fdfb745d62957a4f3f1a53a19cf299798f3201e
Author: Alin Jerpelea <al...@sony.com>
AuthorDate: Sun Jun 14 15:41:57 2020 +0200
drivers: video: fix uninitialized variables
Fix the build error by initializing the variables before we perform
th querry for the ext control.
Signed-off-by: Alin Jerpelea <al...@sony.com>
---
drivers/video/video.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/video/video.c b/drivers/video/video.c
index 2be1530..922c64c 100644
--- a/drivers/video/video.c
+++ b/drivers/video/video.c
@@ -1035,8 +1035,14 @@ static int video_queryctrl(FAR struct v4l2_queryctrl *ctrl)
/* Replace to VIDIOC_QUERY_EXT_CTRL format */
- ext_ctrl.ctrl_class = ctrl->ctrl_class;
- ext_ctrl.id = ctrl->id;
+ ext_ctrl.ctrl_class = ctrl->ctrl_class;
+ ext_ctrl.id = ctrl->id;
+ ext_ctrl.type = ctrl->type;
+ ext_ctrl.minimum = ctrl->minimum;
+ ext_ctrl.maximum = ctrl->maximum;
+ ext_ctrl.step = ctrl->step;
+ ext_ctrl.default_value = ctrl->default_value;
+ ext_ctrl.flags = ctrl->flags;
ret = video_query_ext_ctrl(&ext_ctrl);