Skip to content

Conversation

@ujfalusi
Copy link
Contributor

gcc fails with the following warning (treated as error):
sof/src/ipc/ipc4/handler.c: In function 'ipc_cmd':
sof/src/ipc/ipc4/handler.c:471:5: error: 'status' may be used uninitialized in this function [-Werror=maybe-uninitialized]
471 | if (status == COMP_STATE_READY)
| ^
sof/src/ipc/ipc4/handler.c:439:11: note: 'status' was declared here
439 | uint32_t status;
| ^~~~~~
cc1: all warnings being treated as errors
make[2]: *** [CMakeFiles/sof.dir/build.make:380: CMakeFiles/sof.dir/src/ipc/ipc4/handler.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:2042: CMakeFiles/sof.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

Based on the code, this is a false warning since ppl_count should never be
0 (unless ppl_data->pipelines_count is 0), but never the less, the firmware
does not compile with gcc.

Fixes: 72394a6 ("ipc4: update component direction when pipeline is complete")
Signed-off-by: Peter Ujfalusi peter.ujfalusi@linux.intel.com

gcc fails with the following warning (treated as error):
sof/src/ipc/ipc4/handler.c: In function 'ipc_cmd':
sof/src/ipc/ipc4/handler.c:471:5: error: 'status' may be used uninitialized in this function [-Werror=maybe-uninitialized]
  471 |  if (status == COMP_STATE_READY)
      |     ^
sof/src/ipc/ipc4/handler.c:439:11: note: 'status' was declared here
  439 |  uint32_t status;
      |           ^~~~~~
cc1: all warnings being treated as errors
make[2]: *** [CMakeFiles/sof.dir/build.make:380: CMakeFiles/sof.dir/src/ipc/ipc4/handler.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:2042: CMakeFiles/sof.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

Based on the code, this is a false warning since ppl_count should never be
0 (unless ppl_data->pipelines_count is 0), but never the less, the firmware
does not compile with gcc.

Fixes: 72394a6 ("ipc4: update component direction when pipeline is complete")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
@lgirdwood lgirdwood merged commit e043503 into thesofproject:main Mar 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants