[Spice-devel] [spice-protocol PATCH v1 12/12] fix alignment warnings on _MAGIC

Victor Toso victortoso at redhat.com
Wed Aug 5 05:23:26 PDT 2015


---
 spice/protocol.h | 2 +-
 spice/stats.h    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/spice/protocol.h b/spice/protocol.h
index d3c5962..3c52864 100644
--- a/spice/protocol.h
+++ b/spice/protocol.h
@@ -35,7 +35,7 @@
 #include <spice/enums.h>
 #include <spice/start-packed.h>
 
-#define SPICE_MAGIC (*(uint32_t*)"REDQ")
+#define SPICE_MAGIC (*(uint32_t*)(void*)"REDQ")
 #define SPICE_VERSION_MAJOR 2
 #define SPICE_VERSION_MINOR 2
 
diff --git a/spice/stats.h b/spice/stats.h
index 452d89e..bfa9f10 100644
--- a/spice/stats.h
+++ b/spice/stats.h
@@ -35,7 +35,7 @@
 
 #define SPICE_STAT_SHM_NAME "/spice.%u"
 #define SPICE_STAT_NODE_NAME_MAX 20
-#define SPICE_STAT_MAGIC (*(uint32_t*)"STAT")
+#define SPICE_STAT_MAGIC (*(uint32_t*)(void *)"STAT")
 #define SPICE_STAT_VERSION 1
 
 enum {
-- 
2.4.3



More information about the Spice-devel mailing list