commit 1bfc140892b841c585c0954c054851c3283b1561
parent 042ab6d01b85d09b105eaebc9829dae3bc1e5057
Author: Michael Forney <mforney@mforney.org>
Date: Wed, 23 Oct 2013 17:42:54 -0700
Remove unnecessary _Static_asserts
The C specifications already guarantees the offset of the first member
of a struct is 0.
Diffstat:
5 files changed, 0 insertions(+), 15 deletions(-)
diff --git a/drm-private.h b/drm-private.h
@@ -64,9 +64,6 @@ struct drm_drawable
uint32_t handle;
};
-_Static_assert(offsetof(struct drm_drawable, base) == 0,
- "Non-zero offset of base field");
-
#if WITH_DRM_INTEL
extern const struct wld_drm_interface intel_drm;
#endif
diff --git a/intel.c b/intel.c
@@ -46,9 +46,6 @@ struct intel_drawable
pixman_image_t * virtual;
};
-_Static_assert(offsetof(struct intel_drawable, drm) == 0,
- "Non-zero offset of base field");
-
/* Drawable implementation */
static void intel_fill_rectangle(struct wld_drawable * drawable, uint32_t color,
int32_t x, int32_t y,
diff --git a/pixman.c b/pixman.c
@@ -43,9 +43,6 @@ struct pixman_drawable
struct wld_pixman_context * context;
};
-_Static_assert(offsetof(struct pixman_drawable, base) == 0,
- "Non-zero offset of base field");
-
static void pixman_fill_rectangle(struct wld_drawable * drawable,
uint32_t color, int32_t x, int32_t y,
uint32_t width, uint32_t height);
diff --git a/wayland.c b/wayland.c
@@ -56,9 +56,6 @@ struct wayland_drawable
uint32_t damage_tracking;
};
-_Static_assert(offsetof(struct wayland_drawable, base) == 0,
- "Non-zero offset of base field");
-
static void sync_done(void * data, struct wl_callback * callback,
uint32_t msecs);
diff --git a/wld-private.h b/wld-private.h
@@ -73,9 +73,6 @@ struct font
struct glyph ** glyphs;
};
-_Static_assert(offsetof(struct font, base) == 0,
- "Non-zero offset of base field");
-
struct wld_draw_interface
{
void (* fill_rectangle)(struct wld_drawable * drawable, uint32_t color,