From 71384d5d75895d39ec3387b18ef7993173aab91e Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 5 Dec 2011 16:42:50 +1030 Subject: 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 (Imported from CCAN commit b2cc1341c9464b6da4654fd3fa0aafe934fba578) --- lib/ccan/cast/cast.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/ccan') 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)) -- cgit