From: Karel Zak Date: Thu, 16 May 2019 12:27:15 +0000 (+0200) Subject: fincore: remove unused variable [clang scan] X-Git-Tag: v2.34-rc2~56 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=374cb543815da96fb38484894f851693fa4a3a24;p=thirdparty%2Futil-linux.git fincore: remove unused variable [clang scan] Signed-off-by: Karel Zak --- diff --git a/misc-utils/fincore.c b/misc-utils/fincore.c index 0fb1a759a0..03ff4d154f 100644 --- a/misc-utils/fincore.c +++ b/misc-utils/fincore.c @@ -196,7 +196,6 @@ static int fincore_fd (struct fincore_control *ctl, size_t window_size = N_PAGES_IN_WINDOW * ctl->pagesize; off_t file_offset, len; int rc = 0; - int warned_once = 0; for (file_offset = 0; file_offset < file_size; file_offset += len) { void *window = NULL; @@ -207,11 +206,8 @@ static int fincore_fd (struct fincore_control *ctl, window = mmap(window, len, PROT_NONE, MAP_PRIVATE, fd, file_offset); if (window == MAP_FAILED) { - if (!warned_once) { - rc = -EINVAL; - warn(_("failed to do mmap: %s"), name); - warned_once = 1; - } + rc = -EINVAL; + warn(_("failed to do mmap: %s"), name); break; }