target-s390x: Add missing 'static' and 'const' attributes
This fixes warnings from the static code analysis (smatch). Signed-off-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
parent
bea4acda3b
commit
ecb4e01e34
@ -123,7 +123,7 @@ static void s390x_write_elf64_prefix(Note *note, S390CPU *cpu)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
struct NoteFuncDescStruct {
|
static const struct NoteFuncDescStruct {
|
||||||
int contents_size;
|
int contents_size;
|
||||||
void (*note_contents_func)(Note *note, S390CPU *cpu);
|
void (*note_contents_func)(Note *note, S390CPU *cpu);
|
||||||
} note_func[] = {
|
} note_func[] = {
|
||||||
@ -146,7 +146,7 @@ static int s390x_write_all_elf64_notes(const char *note_name,
|
|||||||
void *opaque)
|
void *opaque)
|
||||||
{
|
{
|
||||||
Note note;
|
Note note;
|
||||||
NoteFuncDesc *nf;
|
const NoteFuncDesc *nf;
|
||||||
int note_size;
|
int note_size;
|
||||||
int ret = -1;
|
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 */
|
int name_size = 8; /* "CORE" or "QEMU" rounded */
|
||||||
size_t elf_note_size = 0;
|
size_t elf_note_size = 0;
|
||||||
int note_head_size;
|
int note_head_size;
|
||||||
NoteFuncDesc *nf;
|
const NoteFuncDesc *nf;
|
||||||
|
|
||||||
assert(class == ELFCLASS64);
|
assert(class == ELFCLASS64);
|
||||||
assert(machine == EM_S390);
|
assert(machine == EM_S390);
|
||||||
|
Loading…
Reference in New Issue
Block a user