diff options
author | Stefan Weil <sw@weilnetz.de> | 2014-03-16 14:49:54 +0100 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2014-03-19 18:35:52 +0100 |
commit | cfd54a0409c92cbf3b2e6af39ce44a13f6940dd0 (patch) | |
tree | 5aa89466df235974434a0956b3dbd82e3cb6bed4 /target-ppc/arch_dump.c | |
parent | 4c8821d13405056776d0255bb78925dac91996c3 (diff) |
target-ppc: Add missing 'static' and 'const' attributes
This fixes warnings from the static code analysis (smatch).
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'target-ppc/arch_dump.c')
-rw-r--r-- | target-ppc/arch_dump.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/target-ppc/arch_dump.c b/target-ppc/arch_dump.c index 17fd4c6fb1..9dccf1ae1f 100644 --- a/target-ppc/arch_dump.c +++ b/target-ppc/arch_dump.c @@ -164,7 +164,7 @@ static void ppc64_write_elf64_speregset(Note *note, PowerPCCPU *cpu) speregset->spe_fscr = cpu_to_be32(cpu->env.spe_fscr); } -struct NoteFuncDescStruct { +static const struct NoteFuncDescStruct { int contents_size; void (*note_contents_func)(Note *note, PowerPCCPU *cpu); } note_func[] = { @@ -196,7 +196,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; if (class != ELFCLASS64) { return -1; @@ -221,7 +221,7 @@ static int ppc64_write_all_elf64_notes(const char *note_name, Note note; int ret = -1; int note_size; - NoteFuncDesc *nf; + const NoteFuncDesc *nf; for (nf = note_func; nf->note_contents_func; nf++) { note.hdr.n_namesz = cpu_to_be32(sizeof(note.name)); |