[PATCH] makedumpfile, sadump: fix warning about unused variable
HATAYAMA Daisuke
d.hatayama at jp.fujitsu.com
Mon Jan 21 02:32:06 EST 2013
Recent gcc does unused variable checking at default of -Wall and
outputs the following warning:
./sadump_info.c: In function 'sadump_initialize_bitmap_memory':
./sadump_info.c:754: warning: variable 'dumpable_bitmap_len' set but not used
Delete it as suggested.
Signed-off-by: HATAYAMA Daisuke <d.hatayama at jp.fujitsu.com>
---
sadump_info.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/sadump_info.c b/sadump_info.c
index 69763be..c0775c5 100644
--- a/sadump_info.c
+++ b/sadump_info.c
@@ -751,7 +751,7 @@ sadump_initialize_bitmap_memory(void)
{
struct sadump_header *sh = si->sh_memory;
struct dump_bitmap *bmp;
- unsigned long dumpable_bitmap_offset, dumpable_bitmap_len;
+ unsigned long dumpable_bitmap_offset;
unsigned long long section, max_section, pfn;
unsigned long long *block_table;
@@ -759,8 +759,6 @@ sadump_initialize_bitmap_memory(void)
si->sub_hdr_offset +
sh->block_size * (sh->sub_hdr_size + sh->bitmap_blocks);
- dumpable_bitmap_len = sh->block_size * sh->dumpable_bitmap_blocks;
-
bmp = malloc(sizeof(struct dump_bitmap));
if (bmp == NULL) {
ERRMSG("Can't allocate memory for the memory-bitmap. %s\n",
--
1.7.7.6
More information about the kexec
mailing list