qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 1/1] Don't discard "const" in ldq_le_p()


From: Hollis Blanchard
Subject: [Qemu-devel] [PATCH 1/1] Don't discard "const" in ldq_le_p()
Date: Wed, 10 Dec 2008 18:04:11 -0600

This fixes warnings like the following, which are repeated once for every file
including cpu-all.h (and there many of them).

In file included from /home/hollisb/source/qemu.git/target-ppc/cpu.h:801,
                 from /home/hollisb/source/qemu.git/qemu-common.h:74,
                 from /home/hollisb/source/qemu.git/hw/hw.h:5,
                 from /home/hollisb/source/qemu.git/vl.c:24:
qemu.git/cpu-all.h: In function `ldq_le_p':
qemu.git/cpu-all.h:268: warning: initialization discards qualifiers from 
pointer target type

Signed-off-by: Hollis Blanchard <address@hidden>
---
 cpu-all.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/cpu-all.h b/cpu-all.h
index 7102014..fdeef0a 100644
--- a/cpu-all.h
+++ b/cpu-all.h
@@ -265,7 +265,7 @@ static inline int ldl_le_p(const void *ptr)
 
 static inline uint64_t ldq_le_p(const void *ptr)
 {
-    uint8_t *p = ptr;
+    const uint8_t *p = ptr;
     uint32_t v1, v2;
     v1 = ldl_le_p(p);
     v2 = ldl_le_p(p + 4);
-- 
1.5.6.5





reply via email to

[Prev in Thread] Current Thread [Next in Thread]