From ce83007c1d140e91250d933ba9e533a00ffb9e84 Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Thu, 26 Feb 2009 10:56:42 +0000 Subject: [PATCH] [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. --- clutter/pango/cogl-pango-glyph-cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clutter/pango/cogl-pango-glyph-cache.c b/clutter/pango/cogl-pango-glyph-cache.c index 8532e80..ada49cf 100644 --- a/clutter/pango/cogl-pango-glyph-cache.c +++ b/clutter/pango/cogl-pango-glyph-cache.c @@ -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 -- 2.7.4