diff --git a/osdep.h b/osdep.h
index cb213e0..1a36c20 100644
--- a/osdep.h
+++ b/osdep.h
@@ -43,8 +43,8 @@ typedef signed int              int_fast16_t;
 /* Convert from a base type to a parent type, with compile time
 checking.  */
 #ifdef __GNUC__
 #define DO_UPCAST(type, field, dev) ( __extension__ ( { \
-    char __attribute__((unused)) offset_must_be_zero[ \
-        -offsetof(type, field)]; \
+    char offset_must_be_zero[ \
+        -offsetof(type, field)] __attribute__((unused)) ; \
     container_of(dev, type, field);}))
 #else
