From b2cc1341c9464b6da4654fd3fa0aafe934fba578 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 21 Nov 2011 15:47:00 +1030 Subject: [PATCH] cast: fix warnings with -Wextra (specifically -Wmissing-field-initializers) As noted by Jan Engelhardt; libHX fixed this already. --- ccan/cast/cast.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ccan/cast/cast.h b/ccan/cast/cast.h index 9f3ecdb7..b108b0c8 100644 --- a/ccan/cast/cast.h +++ b/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)) -- 2.39.2