freetype/src/cache
Werner Lemberg 92aa527a1c * builds/amiga/makefile.os4 (WARNINGS), builds/compiler/gcc-dev.mk
(CFLAGS), builds/compiler/gcc.mk (CFLAGS): Remove
-fno-strict-aliasing.


Say you have `(Foo*)x' and want to assign, pass, or return it as
`(Bar*)'.  If you simply say `x' or `(Bar*)x', then the C compiler
would warn you that type casting incompatible pointer types breaks
strict-aliasing.  The solution is to cast to `(void*)' instead which
is the generic pointer type, so the compiler knows that it should
make no strict-aliasing assumption on `x'.  But the problem with
`(void*)x' is that seems like in C++, unlike C, `void*' is not a
generic pointer type and assigning `void*' to `Bar*' without a cast
causes an error.  The solution is to cast to `Bar*' too, with
`(Bar*)(void*)x' as the result -- this is what the patch does.

* include/freetype/cache/ftccache.h (FTC_CACHE_LOOKUP_CMP),
include/freetype/cache/ftcmru.h (FTC_MRULIST_LOOKUP_CMP): Remove
cast on lvalue, use a temporary pointer instead.
Cast temporarily to (void*) to not break strict aliasing.

* include/freetype/internal/ftmemory.h (FT_MEM_ALLOC,
FT_MEM_REALLOC, FT_MEM_QALLOC, FT_MEM_QREALLOC, FT_MEM_FREE),
src/base/ftglyph.c (FT_Glyph_To_Bitmap): Cast temporarily to (void*)
to not break strict aliasing.

* src/base/ftinit.c (FT_USE_MODULE): Fix wrong type information.

* builds/unix/configure.ac (XX_CFLAGS): Remove -fno-strict-aliasing.

* src/sfnt/rules.mk (SFNT_DRV_SRC): Don't include ttsbit0.c --
it is currently loaded from ttsbit.c.


Other formatting.
2005-05-23 21:33:02 +00:00
..
ftcache.c * src/base/fttrigon.c, src/base/ftgloadr.c: Inlude 2003-12-26 07:26:08 +00:00
ftcbasic.c Handle unsorted SFNT type 4 cmaps correctly (reported by Dirck 2005-05-09 22:11:36 +00:00
ftccache.c * builds/amiga/makefile.os4 (WARNINGS), builds/compiler/gcc-dev.mk 2005-05-23 21:33:02 +00:00
ftccback.h * src/cache/ftcbasic.c (ftc_basic_family_compare, 2004-05-17 09:25:04 +00:00
ftccmap.c Handle unsorted SFNT type 4 cmaps correctly (reported by Dirck 2005-05-09 22:11:36 +00:00
ftcerror.h Formatting. 2001-06-19 23:03:41 +00:00
ftcglyph.c Fix a serious bug in the TT hinter. 2004-11-19 10:35:52 +00:00
ftcimage.c * docs/CHANGES: Updated. 2004-06-12 13:21:20 +00:00
ftcmanag.c Handle unsorted SFNT type 4 cmaps correctly (reported by Dirck 2005-05-09 22:11:36 +00:00
ftcmru.c * src/cache/ftcmru.c (FTC_MruList_RemoveSelection): Handle a NULL 2004-03-20 20:44:45 +00:00
ftcsbits.c * builds/amiga/makefile.os4 (WARNINGS), builds/compiler/gcc-dev.mk 2005-05-23 21:33:02 +00:00
Jamfile * src/type1/t1load.c (parse_dict): Handle RD' and -|' commands 2004-02-03 21:34:29 +00:00
rules.mk Fix callback functions in cache module. 2004-02-17 18:41:58 +00:00