
On Fri, 7 Apr 2023 at 02:03, Tom Rini trini@konsulko.com wrote:
When building this with clang, we get a warning such as: cmd/bootflow.c:412:27: warning: variable 'bflow' is uninitialized when used here [-Wuninitialized] printf("Selected: %s\n", bflow->os_name ? bflow->os_name : bflow->name); ^~~~~
And a suggestion to just initialize bflow to NULL. This would however would be ensuring a bad dereference. Instead, looking at the function we rework things so that when CONFIG_EXPO is not enabled (and so, no UI) we error early and would never reach this point in the code. Simplify the rest slightly as well while at this.
Signed-off-by: Tom Rini trini@konsulko.com
Cc: Simon Glass sjg@chromium.org
cmd/bootflow.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-)
Reviewed-by: Simon Glass sjg@chromium.org