commit 1bfc140

Michael Forney  ·  2013-10-24 00:42:54 +0000 UTC
parent 042ab6d
Remove unnecessary _Static_asserts

The C specifications already guarantees the offset of the first member
of a struct is 0.
5 files changed,  +0, -15
+0, -3
 1@@ -64,9 +64,6 @@ struct drm_drawable
 2     uint32_t handle;
 3 };
 4 
 5-_Static_assert(offsetof(struct drm_drawable, base) == 0,
 6-               "Non-zero offset of base field");
 7-
 8 #if WITH_DRM_INTEL
 9 extern const struct wld_drm_interface intel_drm;
10 #endif
+0, -3
 1@@ -46,9 +46,6 @@ struct intel_drawable
 2     pixman_image_t * virtual;
 3 };
 4 
 5-_Static_assert(offsetof(struct intel_drawable, drm) == 0,
 6-               "Non-zero offset of base field");
 7-
 8 /* Drawable implementation */
 9 static void intel_fill_rectangle(struct wld_drawable * drawable, uint32_t color,
10                                  int32_t x, int32_t y,
+0, -3
 1@@ -43,9 +43,6 @@ struct pixman_drawable
 2     struct wld_pixman_context * context;
 3 };
 4 
 5-_Static_assert(offsetof(struct pixman_drawable, base) == 0,
 6-               "Non-zero offset of base field");
 7-
 8 static void pixman_fill_rectangle(struct wld_drawable * drawable,
 9                                   uint32_t color, int32_t x, int32_t y,
10                                   uint32_t width, uint32_t height);
+0, -3
 1@@ -56,9 +56,6 @@ struct wayland_drawable
 2     uint32_t damage_tracking;
 3 };
 4 
 5-_Static_assert(offsetof(struct wayland_drawable, base) == 0,
 6-               "Non-zero offset of base field");
 7-
 8 static void sync_done(void * data, struct wl_callback * callback,
 9                       uint32_t msecs);
10 
+0, -3
 1@@ -73,9 +73,6 @@ struct font
 2     struct glyph ** glyphs;
 3 };
 4 
 5-_Static_assert(offsetof(struct font, base) == 0,
 6-               "Non-zero offset of base field");
 7-
 8 struct wld_draw_interface
 9 {
10     void (* fill_rectangle)(struct wld_drawable * drawable, uint32_t color,