From: Daniel Kiper <daniel.kiper-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
To: andrew.cooper3-Sxgqhf6Nn4DQT0dZR+AlfA@public.gmane.org,
kumagai-atsushi-biTfD1RFvDe45+QrQBaojngSJqDPrsil@public.gmane.org,
kexec-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
xen-devel-GuqFBffKawuULHF6PoxzQEEOCMrvLtNR@public.gmane.org
Cc: Daniel Kiper <daniel.kiper-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Subject: [PATCH v2 6/7] Mute some compiler warnings
Date: Tue, 16 Jul 2013 14:32:08 +0200 [thread overview]
Message-ID: <1373977929-4253-7-git-send-email-daniel.kiper@oracle.com> (raw)
In-Reply-To: <1373977929-4253-1-git-send-email-daniel.kiper-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
This patch mutes follwing compiler warnings:
- warning: assignment discards ‘const’ qualifier from
pointer target type [enabled by default],
- warning: variable ‘page_offset’ set but not used
[-Wunused-but-set-variable].
v2 - suggestions/fixes:
- do not discard a const qualifier
(suggested by Andrew Cooper).
Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
---
dwarf_info.c | 14 ++++++++------
sadump_info.c | 2 --
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/dwarf_info.c b/dwarf_info.c
index 6e21b8a..85c116e 100644
--- a/dwarf_info.c
+++ b/dwarf_info.c
@@ -1381,6 +1381,7 @@ int
get_die_member(unsigned long long die_off, int index, long *offset,
char **name, int *nbits, int *fbits, unsigned long long *m_die)
{
+ const char *diename;
int tag, size, nfields = 0;
Dwarf_Die result, child, die_base, *die;
@@ -1427,14 +1428,14 @@ get_die_member(unsigned long long die_off, int index, long *offset,
if (!get_data_member_location(die, offset))
*offset = 0;
- *name = dwarf_diename(die);
+ diename = dwarf_diename(die);
/*
* Duplicate the string before we pass it to eppic layer. The
* original string returned by dwarf layer will become invalid
* after clean_dwfl_info() call.
*/
- if (*name)
- *name = strdup(*name);
+ if (diename)
+ *name = strdup(diename);
*m_die = dwarf_dieoffset(die);
get_die_type(die, &die_base);
@@ -1504,6 +1505,7 @@ get_die_name(unsigned long long die_off)
{
Dwarf_Die result;
char *name = NULL;
+ const char *diename;
if (!die_off)
return NULL;
@@ -1513,9 +1515,9 @@ get_die_name(unsigned long long die_off)
return NULL;
}
- name = dwarf_diename(&result);
- if (name)
- name = strdup(name);
+ diename = dwarf_diename(&result);
+ if (diename)
+ name = strdup(diename);
clean_dwfl_info();
return name;
}
diff --git a/sadump_info.c b/sadump_info.c
index be6cf55..01cf5eb 100644
--- a/sadump_info.c
+++ b/sadump_info.c
@@ -948,7 +948,6 @@ int
readpage_sadump(unsigned long long paddr, void *bufptr)
{
unsigned long long pfn, block, whole_offset, perdisk_offset;
- ulong page_offset;
int fd_memory;
if (si->kdump_backed_up &&
@@ -957,7 +956,6 @@ readpage_sadump(unsigned long long paddr, void *bufptr)
paddr += si->backup_offset - si->backup_src_start;
pfn = paddr_to_pfn(paddr);
- page_offset = paddr % info->page_size;
if (pfn >= si->sh_memory->max_mapnr)
return FALSE;
--
1.7.10.4
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
next prev parent reply other threads:[~2013-07-16 12:32 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-16 12:32 [PATCH v2 0/7] makedumpfile: Xen fixes and minor cleanups Daniel Kiper
[not found] ` <1373977929-4253-1-git-send-email-daniel.kiper-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2013-07-16 12:32 ` [PATCH v2 1/7] xen: Improve calculation of beginning of virtual address space Daniel Kiper
[not found] ` <1373977929-4253-2-git-send-email-daniel.kiper-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2013-07-18 8:03 ` Atsushi Kumagai
2013-07-16 12:32 ` [PATCH v2 2/7] elf: Properly check buf size in get_pt_note_info() Daniel Kiper
[not found] ` <1373977929-4253-3-git-send-email-daniel.kiper-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2013-07-18 8:03 ` Atsushi Kumagai
2013-07-16 12:32 ` [PATCH v2 3/7] xen: Take into account new frame table address since Xen 4.3 Daniel Kiper
[not found] ` <1373977929-4253-4-git-send-email-daniel.kiper-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2013-07-18 8:03 ` Atsushi Kumagai
2013-07-16 12:32 ` [PATCH v2 4/7] xen: Enforce page size only when xen-syms file is used Daniel Kiper
[not found] ` <1373977929-4253-5-git-send-email-daniel.kiper-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2013-07-19 9:20 ` Atsushi Kumagai
[not found] ` <20130719182024.7695f88a6e4fe1160a10c74c-biTfD1RFvDe45+QrQBaojngSJqDPrsil@public.gmane.org>
2013-07-19 13:44 ` Daniel Kiper
[not found] ` <20130719134451.GF11233-ri7RxvcH2jeCtUdEpT35kVHq7GDQUN6HS7aiLakcVNdmR6Xm/wNWPw@public.gmane.org>
2013-07-22 7:35 ` Atsushi Kumagai
[not found] ` <20130722163529.39ce6b1903324f8c3a0e7a44-biTfD1RFvDe45+QrQBaojngSJqDPrsil@public.gmane.org>
2013-07-22 21:23 ` Daniel Kiper
2013-07-16 12:32 ` [PATCH v2 5/7] Do not break progress messages Daniel Kiper
[not found] ` <1373977929-4253-6-git-send-email-daniel.kiper-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2013-07-19 9:20 ` Atsushi Kumagai
2013-07-16 12:32 ` Daniel Kiper [this message]
[not found] ` <1373977929-4253-7-git-send-email-daniel.kiper-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2013-07-19 0:03 ` [PATCH v2 6/7] Mute some compiler warnings HATAYAMA Daisuke
[not found] ` <51E88265.1000005-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2013-07-19 9:20 ` Atsushi Kumagai
2013-07-16 12:32 ` [PATCH v2 7/7] Use elf_getshdrstrndx() instead of elf_getshstrndx() Daniel Kiper
[not found] ` <1373977929-4253-8-git-send-email-daniel.kiper-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2013-07-18 8:03 ` Atsushi Kumagai
[not found] ` <20130718170322.ea01294e20c9cdc810b40eb9-biTfD1RFvDe45+QrQBaojngSJqDPrsil@public.gmane.org>
2013-07-18 12:52 ` Daniel Kiper
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1373977929-4253-7-git-send-email-daniel.kiper@oracle.com \
--to=daniel.kiper-qhclzuegtsvqt0dzr+alfa@public.gmane.org \
--cc=andrew.cooper3-Sxgqhf6Nn4DQT0dZR+AlfA@public.gmane.org \
--cc=kexec-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=kumagai-atsushi-biTfD1RFvDe45+QrQBaojngSJqDPrsil@public.gmane.org \
--cc=xen-devel-GuqFBffKawuULHF6PoxzQEEOCMrvLtNR@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).