qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] target-s390x: Add missing 'static' and 'const' attributes
@ 2014-03-16 13:49 Stefan Weil
  2014-03-16 17:59 ` Richard Henderson
  2014-03-17 14:43 ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
  0 siblings, 2 replies; 3+ messages in thread
From: Stefan Weil @ 2014-03-16 13:49 UTC (permalink / raw)
  To: qemu-trivial; +Cc: Alexander Graf, Stefan Weil, qemu-devel, Richard Henderson

This fixes warnings from the static code analysis (smatch).

Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
 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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] target-s390x: Add missing 'static' and 'const' attributes
  2014-03-16 13:49 [Qemu-devel] [PATCH] target-s390x: Add missing 'static' and 'const' attributes Stefan Weil
@ 2014-03-16 17:59 ` Richard Henderson
  2014-03-17 14:43 ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
  1 sibling, 0 replies; 3+ messages in thread
From: Richard Henderson @ 2014-03-16 17:59 UTC (permalink / raw)
  To: Stefan Weil, qemu-trivial; +Cc: qemu-devel, Alexander Graf

On 03/16/2014 06:49 AM, Stefan Weil wrote:
> This fixes warnings from the static code analysis (smatch).
> 
> Signed-off-by: Stefan Weil <sw@weilnetz.de>
> ---
>  target-s390x/arch_dump.c |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Reviewed-by: Richard Henderson <rth@twiddle.net>


r~

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [Qemu-trivial] [PATCH] target-s390x: Add missing 'static' and 'const' attributes
  2014-03-16 13:49 [Qemu-devel] [PATCH] target-s390x: Add missing 'static' and 'const' attributes Stefan Weil
  2014-03-16 17:59 ` Richard Henderson
@ 2014-03-17 14:43 ` Michael Tokarev
  1 sibling, 0 replies; 3+ messages in thread
From: Michael Tokarev @ 2014-03-17 14:43 UTC (permalink / raw)
  To: Stefan Weil; +Cc: qemu-trivial, Richard Henderson, Alexander Graf, qemu-devel

16.03.2014 17:49, Stefan Weil wrote:
> This fixes warnings from the static code analysis (smatch).

Thanks, applied to -trivial.

/mjt

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-03-17 14:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-16 13:49 [Qemu-devel] [PATCH] target-s390x: Add missing 'static' and 'const' attributes Stefan Weil
2014-03-16 17:59 ` Richard Henderson
2014-03-17 14:43 ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev

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).