summaryrefslogtreecommitdiffstats
path: root/misc-utils
diff options
context:
space:
mode:
authorKarel Zak2019-05-16 14:27:15 +0200
committerKarel Zak2019-05-16 14:27:15 +0200
commit374cb543815da96fb38484894f851693fa4a3a24 (patch)
treed910640a093b938200e10fddb0e5cb91b4f1b376 /misc-utils
parentcal: make sure months_in_row makes sense [coverity scan] (diff)
downloadkernel-qcow2-util-linux-374cb543815da96fb38484894f851693fa4a3a24.tar.gz
kernel-qcow2-util-linux-374cb543815da96fb38484894f851693fa4a3a24.tar.xz
kernel-qcow2-util-linux-374cb543815da96fb38484894f851693fa4a3a24.zip
fincore: remove unused variable [clang scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'misc-utils')
-rw-r--r--misc-utils/fincore.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/misc-utils/fincore.c b/misc-utils/fincore.c
index 0fb1a759a..03ff4d154 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;
}