Fix strict-aliasing warning.

* src/base/ftglyph.c (FT_Glyph_To_Bitmap): Avoid double cast.
This commit is contained in:
Gilles Espinasse 2012-07-07 11:17:02 +02:00 committed by Werner Lemberg
parent fec113d724
commit 9123404c57
2 changed files with 10 additions and 4 deletions

View File

@ -1,3 +1,9 @@
2012-07-07 Gilles Espinasse <g.esp@free.fr>
Fix strict-aliasing warning.
* src/base/ftglyph.c (FT_Glyph_To_Bitmap): Avoid double cast.
2012-07-07 Dave Thomas <dave.thomas@metaforic.com>
[ARM] Fix FT_MulFix_arm.

View File

@ -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 */