mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 19:42:05 +00:00
[cogl-pango-glyph-cache] Fix compiler warning on 64-bit
gcc warns about casting a pointer to a guint because it is a different size on 64-bit machines. However the pointer is only used as a hash so it doesn't matter if we lose the most significant bits. The patch makes it use GPOINTER_TO_UINT instead which first casts it to a gulong and avoids the warning.
This commit is contained in:
parent
3425331cc1
commit
ce83007c1d
@ -129,7 +129,7 @@ cogl_pango_glyph_cache_hash_func (gconstpointer key)
|
||||
number. We can safely directly compare the pointers because the
|
||||
key holds a reference to the font so it is not possible that a
|
||||
different font will have the same memory address */
|
||||
return (guint) cache_key->font ^ cache_key->glyph;
|
||||
return GPOINTER_TO_UINT (cache_key->font) ^ cache_key->glyph;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
Loading…
Reference in New Issue
Block a user