Commit 1aca4d5ae9f3c6af018105f89984752cdbdba121
Committed by
Tom Rini
1 parent
d2d20d9925
Exists in
smarc_8mq_lf_v2020.04
and in
17 other branches
cmd: mtdparts: fix uninitialized variable warning
commit 06a040a31bcf ("cmd: mtdparts: fix null pointer dereference in parse_mtdparts") removed the initialization of a pointer variable, which is subsequently used in a debug() call. This produces an uninitialized variable warning, when compiling with DEBUG defined. Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff
cmd/mtdparts.c
... | ... | @@ -1556,7 +1556,7 @@ |
1556 | 1556 | int err = 1; |
1557 | 1557 | char tmp_parts[MTDPARTS_MAXLEN]; |
1558 | 1558 | |
1559 | - debug("\n---parse_mtdparts---\nmtdparts = %s\n\n", p); | |
1559 | + debug("\n---parse_mtdparts---\nmtdparts = %s\n\n", mtdparts); | |
1560 | 1560 | |
1561 | 1561 | /* delete all devices and partitions */ |
1562 | 1562 | if (mtd_devices_init() != 0) { |