examples/pipeline: fix build with some compilers
PATCH 1/1 examples/pipeline: fix build with some compilers
Fixes the following build failure with gcc 5.4.0 because of uninitialized variables:
[..]examples/pipeline/cli.c:1801:10: error: 'idx' may be used
uninitialized in this function [-Werror=maybe-uninitialized]
[..]examples/pipeline/cli.c:1916:10: error: 'idx' may be used
uninitialized in this function [-Werror=maybe-uninitialized]
[..]
--- examples/pipeline/cli.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
examples/pipeline/cli.c +2 -2
@@ -1786,7 +1786,7 @@ cmd_pipeline_regrd(char **tokens,/* index. */ if (!strcmp (tokens[4 ],"index" )) { -uint32_t idx; +uint32_t idx =0 ;if (n_tokens !=6 ) {snprintf (out, out_size,MSG_ARG_MISMATCH , tokens[0 ]);
@@ -1901,7 +1901,7 @@ cmd_pipeline_regwr(char **tokens,/* index. */ if (!strcmp (tokens[6 ],"index" )) { -uint32_t idx; +uint32_t idx =0 ;if (n_tokens !=8 ) {snprintf (out, out_size,MSG_ARG_MISMATCH , tokens[0 ]);
Signature · 1 line
2.25.1
Thomas Monjalon
Applied25/09/2022 11:20, Ali Alnubani:
Quoted 11 lines
Fixes the following build failure with gcc 5.4.0 because of uninitialized variables:
[..]
examples/pipeline/cli.c:1801:10: error: 'idx' may be used
uninitialized in this function [-Werror=maybe-uninitialized]
[..]examples/pipeline/cli.c:1916:10: error: 'idx' may be used
uninitialized in this function [-Werror=maybe-uninitialized]
[..]
Quoted 4 lines
Fixes 83f58a7b7b0a ("examples/pipeline: add commands for direct registers")Signed-off-by Ali Alnubani <[email protected]>
Applied, thanks.