freetype2/src/sfnt
Werner Lemberg ce33a312da FT_USE_MODULE declares things as:
extern const FT_Module_Class

(or similar for C++).  However, the actual types of the variables
being declared are often different, e.g., FT_Driver_ClassRec or
FT_Renderer_Class.  (Some are, indeed, FT_Module_Class.)

This works with most C compilers (since those structs begin with an
FT_Module_Class struct), but technically it's undefined behavior.

To quote the ISO/IEC 9899:TC2 final committee draft, section 6.2.7
paragraph 2:

  All declarations that refer to the same object or function shall
  have compatible type; otherwise, the behavior is undefined.

(And they are not compatible types.)

Most C compilers don't reject (or even detect!) code which has this
issue, but the GCC LTO development branch compiler does.  (It
outputs the types of the objects while generating .o files, along
with a bunch of other information, then compares them when doing the
final link-time code generation pass.)

Patch from Savannah bug #25133.

* src/base/ftinit.c (FT_USE_MODULE): Include variable type.

* builds/amiga/include/freetype/config/ftmodule.h,
include/freetype/config/ftmodule.h, */module.mk: Updated to declare
pass correct types to FT_USE_MODULE.
2008-12-21 10:29:30 +00:00
..
Jamfile * src/{otvalid,sfnt}/Jamfile: Add missing targets for multi build by jam 2008-09-21 18:33:57 +00:00
module.mk FT_USE_MODULE declares things as: 2008-12-21 10:29:30 +00:00
rules.mk * src/base/ftoutln.c (FT_Outline_Get_Orientation): Fix compilation 2007-01-13 08:45:00 +00:00
sfdriver.c Formatting, copyright years, s/memcpy/ft_memcpy/. 2007-02-12 21:44:10 +00:00
sfdriver.h finishing function header formatting 2001-06-28 17:49:10 +00:00
sferrors.h * include/freetype/internal/ftobjs.h: Don't include 2004-09-06 07:06:56 +00:00
sfnt.c * include/freetype/ftoutln.h (FT_Outline_Embolden): Mention in 2006-02-15 06:05:52 +00:00
sfobjs.c Really fix Savannah bug #25010: An SFNT font with neither outlines 2008-12-09 06:51:56 +00:00
sfobjs.h * massive re-formatting changes to many, many source files. I don't 2002-08-27 20:20:29 +00:00
ttbdf.c Formatting, copyright years. 2006-02-25 16:52:16 +00:00
ttbdf.h Convert to Unix line endings. 2006-03-01 11:31:08 +00:00
ttcmap.c typo 2008-10-09 07:14:08 +00:00
ttcmap.h * src/sfnt/ttcmap.c, src/sfnt/ttcmap.h: 2005-11-30 18:47:49 +00:00
ttkern.c * src/autofit/afcjk.c (af_cjk_hints_compute_edges): Remove unused 2007-05-15 06:49:37 +00:00
ttkern.h formatting, minor doc fixes, copyright years 2007-01-05 09:03:31 +00:00
ttload.c * include/freetype/freetype.h (FT_LOAD_ADVANCE_ONLY): Use value 2008-12-05 18:37:44 +00:00
ttload.h * include/freetype/ftoutln.h (FT_Outline_Embolden): Mention in 2006-02-15 06:05:52 +00:00
ttmtx.c Formatting. 2008-11-29 09:31:44 +00:00
ttmtx.h Clean up the SFNT_Interface. In this final pass, `load_hmtx' is 2006-02-14 07:25:57 +00:00
ttpost.c * src/sfnt/sfobjs.c (tt_face_get_name): Modified to return an error 2008-11-08 07:20:25 +00:00
ttpost.h * massive re-formatting changes to many, many source files. I don't 2002-08-27 20:20:29 +00:00
ttsbit.c Formatting. 2008-11-29 09:31:44 +00:00
ttsbit.h Formatting. 2008-11-29 09:31:44 +00:00
ttsbit0.c Cosmetic code changes. 2008-05-28 22:17:28 +00:00