Commit 7009a6eb032dc54a5f2e7c39742f254b2c3b491c

Werner Lemberg 2009-07-29T11:53:13

Fix Redhat bugzilla #513582 and Savannah bug #26849. * src/cache/ftccache.h (FTC_CACHE_LOOKUP_CMP) <FTC_INLINE>: Fix aliasing bug.

diff --git a/ChangeLog b/ChangeLog
index 21c101f..bc0d528 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-07-29  Fabrice Bellet  <fabrice@bellet.info>
+
+	Fix Redhat bugzilla #513582 and Savannah bug #26849.
+
+	* src/cache/ftccache.h (FTC_CACHE_LOOKUP_CMP) <FTC_INLINE>: Fix
+	aliasing bug.
+
 2009-07-19  Werner Lemberg  <wl@gnu.org>
 
 	Document recent library changes.
diff --git a/src/cache/ftccache.h b/src/cache/ftccache.h
index 8c0a7c9..be5b24e 100644
--- a/src/cache/ftccache.h
+++ b/src/cache/ftccache.h
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType internal cache interface (specification).                   */
 /*                                                                         */
-/*  Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006, 2007 by             */
+/*  Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 by       */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -246,8 +246,7 @@ FT_BEGIN_HEADER
     error = FTC_Cache_NewNode( _cache, _hash, query, &_node );           \
                                                                          \
   _Ok:                                                                   \
-    _pnode = (FTC_Node*)(void*)&(node);                                  \
-    *_pnode = _node;                                                     \
+    node = _node;                                                        \
   FT_END_STMNT
 
 #else /* !FTC_INLINE */