Commit d8a3db25 authored by Ville Syrjälä's avatar Ville Syrjälä
Browse files

sna: Avoid strict aliasing violations with glyphinfo

Just access the xGlyphInfo members directly to avoid the
compiler getting upset about strict aliasing violations.
Signed-off-by: Ville Syrjälä's avatarVille Syrjälä <>
parent 97ce0215
......@@ -85,8 +85,11 @@
#define NO_ATLAS ((PicturePtr)-1)
#define glyph_valid(g) *((uint32_t *)&(g)->info.width)
#define glyph_copy_size(r, g) *(uint32_t *)&(r)->width = *(uint32_t *)&g->info.width
#define glyph_valid(g) ((g)->info.width || (g)->info.height)
#define glyph_copy_size(r, g) do { \
(r)->width = (g)->info.width; \
(r)->height = (g)->info.height; \
} while (0)
static pixman_glyph_cache_t *__global_glyph_cache;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment