summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--spice/macros.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/spice/macros.h b/spice/macros.h
index 034caf7..29cdf82 100644
--- a/spice/macros.h
+++ b/spice/macros.h
@@ -140,7 +140,7 @@
#endif
#define SPICE_CONTAINEROF(ptr, struct_type, member) \
- ((struct_type *)((uint8_t *)(ptr) - SPICE_OFFSETOF(struct_type, member)))
+ ((struct_type *)(void *)((uint8_t *)(ptr) - SPICE_OFFSETOF(struct_type, member)))
#define SPICE_MEMBER_P(struct_p, struct_offset) \
((gpointer) ((guint8*) (struct_p) + (glong) (struct_offset)))