shithub: freetype+ttf2subf

Download patch

ref: 9123404c578f6cfb6b69e9b23fbce357027d2bfc
parent: fec113d7245b98631b8bded8be20aa1dc1d3991a
author: Gilles Espinasse <[email protected]>
date: Sat Jul 7 07:17:02 EDT 2012

Fix strict-aliasing warning.

* src/base/ftglyph.c (FT_Glyph_To_Bitmap): Avoid double cast.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-07-07  Gilles Espinasse  <[email protected]>
+
+	Fix strict-aliasing warning.
+
+	* src/base/ftglyph.c (FT_Glyph_To_Bitmap): Avoid double cast.
+
 2012-07-07  Dave Thomas  <[email protected]>
 
 	[ARM] Fix FT_MulFix_arm.
--- a/src/base/ftglyph.c
+++ b/src/base/ftglyph.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType convenience functions to handle glyphs (body).              */
 /*                                                                         */
-/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2007, 2008, 2010 by       */
+/*  Copyright 1996-2005, 2007, 2008, 2010, 2012 by                         */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -510,7 +510,7 @@
     FT_GlyphSlotRec           dummy;
     FT_GlyphSlot_InternalRec  dummy_internal;
     FT_Error                  error = FT_Err_Ok;
-    FT_Glyph                  glyph;
+    FT_Glyph                  b, glyph;
     FT_BitmapGlyph            bitmap = NULL;
     const FT_Glyph_Class*     clazz;
 
@@ -547,10 +547,10 @@
     dummy.format   = clazz->glyph_format;
 
     /* create result bitmap glyph */
-    error = ft_new_glyph( library, FT_BITMAP_GLYPH_CLASS_GET,
-                          (FT_Glyph*)(void*)&bitmap );
+    error = ft_new_glyph( library, FT_BITMAP_GLYPH_CLASS_GET, &b );
     if ( error )
       goto Exit;
+    bitmap = (FT_BitmapGlyph)b;
 
 #if 1
     /* if `origin' is set, translate the glyph image */