From 1aca4d5ae9f3c6af018105f89984752cdbdba121 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Lothar=20Wa=C3=9Fmann?= Date: Thu, 8 Jun 2017 14:04:03 +0200 Subject: [PATCH] cmd: mtdparts: fix uninitialized variable warning MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- cmd/mtdparts.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/mtdparts.c b/cmd/mtdparts.c index 112bf1f3e3..683c48bdad 100644 --- a/cmd/mtdparts.c +++ b/cmd/mtdparts.c @@ -1556,7 +1556,7 @@ static int parse_mtdparts(const char *const mtdparts) int err = 1; char tmp_parts[MTDPARTS_MAXLEN]; - debug("\n---parse_mtdparts---\nmtdparts = %s\n\n", p); + debug("\n---parse_mtdparts---\nmtdparts = %s\n\n", mtdparts); /* delete all devices and partitions */ if (mtd_devices_init() != 0) { -- 2.39.5