aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2020-04-17 14:14:30 -0700
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2020-04-20 14:40:14 +0200
commit06dc2b0c0e9705d5d4607c89dfc7decf714a68d6 (patch)
tree7e5cf0427e96c93bfd6ed7b71d2a9811c324ad0f /utils
parent2984938795a23e4bdf5a4b75c12a4245a2e0daff (diff)
treewide: add extra {} to initialization
Found with clang-tidy's clang-diagnostic-missing-braces Signed-off-by: Rosen Penev <rosenp@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> [hverkuil-cisco@xs4all.nl: add spaces after { and before }]
Diffstat (limited to 'utils')
-rw-r--r--utils/cec-follower/cec-processing.cpp12
-rw-r--r--utils/v4l2-compliance/v4l2-test-debug.cpp2
-rw-r--r--utils/v4l2-ctl/v4l2-ctl-common.cpp2
3 files changed, 8 insertions, 8 deletions
diff --git a/utils/cec-follower/cec-processing.cpp b/utils/cec-follower/cec-processing.cpp
index df1d95c4..373519fc 100644
--- a/utils/cec-follower/cec-processing.cpp
+++ b/utils/cec-follower/cec-processing.cpp
@@ -729,22 +729,22 @@ static void processMsg(struct node *node, struct cec_msg &msg, unsigned me)
const struct short_audio_desc supported_formats[] = {
{ 2, SAD_FMT_CODE_AC3,
SAD_SAMPLE_FREQ_MASK_32 | SAD_SAMPLE_FREQ_MASK_44_1,
- 64, 0, 0 },
+ { 64 }, 0, 0 },
{ 4, SAD_FMT_CODE_AC3,
SAD_SAMPLE_FREQ_MASK_32,
- 32, 0, 0 },
+ { 32 }, 0, 0 },
{ 4, SAD_FMT_CODE_ONE_BIT_AUDIO,
SAD_SAMPLE_FREQ_MASK_48 | SAD_SAMPLE_FREQ_MASK_192,
- 123, 0, 0 },
+ { 123 }, 0, 0 },
{ 8, SAD_FMT_CODE_EXTENDED,
SAD_SAMPLE_FREQ_MASK_96,
- 0, 0, SAD_EXT_TYPE_DRA },
+ { 0 }, 0, SAD_EXT_TYPE_DRA },
{ 2, SAD_FMT_CODE_EXTENDED,
SAD_SAMPLE_FREQ_MASK_176_4,
- SAD_FRAME_LENGTH_MASK_960 | SAD_FRAME_LENGTH_MASK_1024, 1, SAD_EXT_TYPE_MPEG4_HE_AAC_SURROUND },
+ { SAD_FRAME_LENGTH_MASK_960 | SAD_FRAME_LENGTH_MASK_1024 }, 1, SAD_EXT_TYPE_MPEG4_HE_AAC_SURROUND },
{ 2, SAD_FMT_CODE_EXTENDED,
SAD_SAMPLE_FREQ_MASK_44_1,
- SAD_BIT_DEPTH_MASK_16 | SAD_BIT_DEPTH_MASK_24, 0, SAD_EXT_TYPE_LPCM_3D_AUDIO },
+ { SAD_BIT_DEPTH_MASK_16 | SAD_BIT_DEPTH_MASK_24 }, 0, SAD_EXT_TYPE_LPCM_3D_AUDIO },
};
__u8 num_descriptors, audio_format_id[4], audio_format_code[4];
diff --git a/utils/v4l2-compliance/v4l2-test-debug.cpp b/utils/v4l2-compliance/v4l2-test-debug.cpp
index e7f375b6..3f43e661 100644
--- a/utils/v4l2-compliance/v4l2-test-debug.cpp
+++ b/utils/v4l2-compliance/v4l2-test-debug.cpp
@@ -37,7 +37,7 @@
int testRegister(struct node *node)
{
struct v4l2_dbg_register reg;
- struct v4l2_dbg_chip_info chip = { 0 };
+ struct v4l2_dbg_chip_info chip = {};
int ret;
int uid = getuid();
diff --git a/utils/v4l2-ctl/v4l2-ctl-common.cpp b/utils/v4l2-ctl/v4l2-ctl-common.cpp
index aee2551b..ce6ac2fd 100644
--- a/utils/v4l2-ctl/v4l2-ctl-common.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl-common.cpp
@@ -924,7 +924,7 @@ void common_set(cv4l_fd &_fd)
qc.flags & V4L2_CTRL_FLAG_UPDATE)
use_ext_ctrls = true;
if (qc.flags & V4L2_CTRL_FLAG_HAS_PAYLOAD) {
- struct v4l2_ext_controls ctrls = { 0, 1 };
+ struct v4l2_ext_controls ctrls = { { 0 }, 1 };
unsigned divide[V4L2_CTRL_MAX_DIMS] = { 0 };
ctrl_subset subset;
long long v;

Privacy Policy