From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60688) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPBRG-0006xC-M3 for qemu-devel@nongnu.org; Sun, 16 Mar 2014 09:49:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WPBRF-0006XI-Lx for qemu-devel@nongnu.org; Sun, 16 Mar 2014 09:49:18 -0400 From: Stefan Weil Date: Sun, 16 Mar 2014 14:49:11 +0100 Message-Id: <1394977751-18881-1-git-send-email-sw@weilnetz.de> Subject: [Qemu-devel] [PATCH] target-s390x: Add missing 'static' and 'const' attributes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-trivial@nongnu.org Cc: Alexander Graf , Stefan Weil , qemu-devel@nongnu.org, Richard Henderson This fixes warnings from the static code analysis (smatch). Signed-off-by: Stefan Weil --- target-s390x/arch_dump.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target-s390x/arch_dump.c b/target-s390x/arch_dump.c index 5cbb53c..a1554f5 100644 --- a/target-s390x/arch_dump.c +++ b/target-s390x/arch_dump.c @@ -123,7 +123,7 @@ static void s390x_write_elf64_prefix(Note *note, S390CPU *cpu) } -struct NoteFuncDescStruct { +static const struct NoteFuncDescStruct { int contents_size; void (*note_contents_func)(Note *note, S390CPU *cpu); } note_func[] = { @@ -146,7 +146,7 @@ static int s390x_write_all_elf64_notes(const char *note_name, void *opaque) { Note note; - NoteFuncDesc *nf; + const NoteFuncDesc *nf; int note_size; int ret = -1; @@ -192,7 +192,7 @@ ssize_t cpu_get_note_size(int class, int machine, int nr_cpus) int name_size = 8; /* "CORE" or "QEMU" rounded */ size_t elf_note_size = 0; int note_head_size; - NoteFuncDesc *nf; + const NoteFuncDesc *nf; assert(class == ELFCLASS64); assert(machine == EM_S390); -- 1.7.10.4