From 34813bdd29cd2012bec61156286018ed9e13817a Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Fri, 12 Jul 2019 21:45:50 +0100 Subject: [PATCH] libfdisk: fix variable shadowing MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit libfdisk/src/context.c:678:7: warning: declaration of ‘rc’ shadows a previous local [-Wshadow] Signed-off-by: Sami Kerola --- libfdisk/src/context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libfdisk/src/context.c b/libfdisk/src/context.c index 3677648e90..770aa4d520 100644 --- a/libfdisk/src/context.c +++ b/libfdisk/src/context.c @@ -675,7 +675,7 @@ int fdisk_assign_device(struct fdisk_context *cxt, fd = open(fname, (readonly ? O_RDONLY : O_RDWR ) | O_CLOEXEC); if (fd < 0) { - int rc = -errno; + rc = -errno; DBG(CXT, ul_debugobj(cxt, "failed to assign device [rc=%d]", rc)); return rc; } -- 2.47.3