summaryrefslogtreecommitdiff
path: root/lib/ccan
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2011-12-05 16:42:50 +1030
committerRusty Russell <rusty@rustcorp.com.au>2011-12-05 16:42:50 +1030
commit71384d5d75895d39ec3387b18ef7993173aab91e (patch)
treead3775b7d98bea6cb123c16c6412265ea76b19e7 /lib/ccan
parent3b390b754eb8edd43678bdd080b06f102766683d (diff)
downloadsamba-71384d5d75895d39ec3387b18ef7993173aab91e.tar.gz
samba-71384d5d75895d39ec3387b18ef7993173aab91e.tar.bz2
samba-71384d5d75895d39ec3387b18ef7993173aab91e.zip
lib/ccan/cast: fix warnings with -Wextra (specifically -Wmissing-field-initializers)
As noted by Jan Engelhardt; libHX fixed this already. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit b2cc1341c9464b6da4654fd3fa0aafe934fba578)
Diffstat (limited to 'lib/ccan')
-rw-r--r--lib/ccan/cast/cast.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/ccan/cast/cast.h b/lib/ccan/cast/cast.h
index 9f3ecdb717..b108b0c864 100644
--- a/lib/ccan/cast/cast.h
+++ b/lib/ccan/cast/cast.h
@@ -106,11 +106,11 @@
)
#define cast_const_strip1(expr) \
- __typeof__(*(struct { int z; __typeof__(expr) x; }){0}.x)
+ __typeof__(*(union { int z; __typeof__(expr) x; }){0}.x)
#define cast_const_strip2(expr) \
- __typeof__(**(struct { int z; __typeof__(expr) x; }){0}.x)
+ __typeof__(**(union { int z; __typeof__(expr) x; }){0}.x)
#define cast_const_strip3(expr) \
- __typeof__(***(struct { int z; __typeof__(expr) x; }){0}.x)
+ __typeof__(***(union { int z; __typeof__(expr) x; }){0}.x)
#define cast_const_compat1(expr, type) \
__builtin_types_compatible_p(cast_const_strip1(expr), \
cast_const_strip1(type))