[PATCH] makedumpfile: fix compilation warning
Pratyush Anand
panand at redhat.com
Sun Apr 17 21:53:52 PDT 2016
commit "46176a97f329: Exclude page structures of non-dumped pages" sets
did_deletes but never uses that, which generates following compilation
warning. Fix that.
makedumpfile.c: In function ‘find_unused_vmemmap_pages’:
makedumpfile.c:5912:25: warning: variable ‘did_deletes’ set but not used
[-Wunused-but-set-variable]
int i, sz, numpages=0, did_deletes;
Signed-off-by: Pratyush Anand <panand at redhat.com>
---
makedumpfile.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/makedumpfile.c b/makedumpfile.c
index dab7c4de44d4..94c969c16ccc 100644
--- a/makedumpfile.c
+++ b/makedumpfile.c
@@ -5948,7 +5948,7 @@ find_unused_vmemmap_pages(void)
unsigned long long pfn;
unsigned long *lp1, *lp2, startpfn, endpfn;
unsigned long vmapstartpfn, vmapnumpfns;
- int i, sz, numpages=0, did_deletes;
+ int i, sz, numpages=0;
int startword, numwords, do_break=0;
long deleted_pages = 0;
off_t new_offset1, new_offset2;
@@ -5956,7 +5956,6 @@ find_unused_vmemmap_pages(void)
/* read each block of both bitmaps */
for (pfn = 0; pfn < info->max_mapnr; pfn += PFN_BUFBITMAP) { /* size in bits */
numpages++;
- did_deletes = 0;
new_offset1 = bitmap1->offset + BUFSIZE_BITMAP * (pfn / PFN_BUFBITMAP);
if (lseek(bitmap1->fd, new_offset1, SEEK_SET) < 0 ) {
ERRMSG("Can't seek the bitmap(%s). %s\n",
@@ -6032,7 +6031,6 @@ find_unused_vmemmap_pages(void)
return FAILED;
}
deleted_pages += vmapnumpfns;
- did_deletes = 1;
}
}
}
@@ -6054,7 +6052,6 @@ find_unused_vmemmap_pages(void)
return FAILED;
}
deleted_pages += vmapnumpfns;
- did_deletes = 1;
}
}
}
--
2.5.0
More information about the kexec
mailing list