freetype2/include/freetype
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
..
config FT_USE_MODULE declares things as: 2008-12-21 10:29:30 +00:00
internal * src/cff/cffdrivr.c (cff_get_cmap_info): Initialize `format' field. 2008-11-12 06:29:41 +00:00
freetype.h * docs/CHANGES: Updated. 2008-12-18 06:32:10 +00:00
ftadvanc.h * autogen.sh, builds/unix/configure.raw, 2008-09-12 16:27:48 +00:00
ftbbox.h Improve navigation in API reference. 2008-06-26 19:56:51 +00:00
ftbdf.h Improve navigation in API reference. 2008-06-26 19:56:51 +00:00
ftbitmap.h * include/freetype/ftsynth.h, src/basae/ftsynth.c: Move 2008-12-17 10:50:31 +00:00
ftcache.h * devel/ftoption.h, include/freetype/config/ftoption.h 2008-11-05 14:34:29 +00:00
ftchapters.h * autogen.sh, builds/unix/configure.raw, 2008-09-12 16:27:48 +00:00
ftcid.h Improve navigation in API reference. 2008-06-26 19:56:51 +00:00
fterrdef.h * include/freetype/fterrdef.h (FT_Err_Corrupted_Font_Header, 2007-06-01 22:16:43 +00:00
fterrors.h Typo. From Han-Wen. 2007-01-23 06:29:23 +00:00
ftgasp.h * autogen.sh, builds/unix/configure.raw, 2008-09-12 16:27:48 +00:00
ftglyph.h Add one more example to the documentation of FT_Glyph_To_Bitmap. 2008-08-06 09:09:41 +00:00
ftgxval.h Improve navigation in API reference. 2008-06-26 19:56:51 +00:00
ftgzip.h Improve navigation in API reference. 2008-06-26 19:56:51 +00:00
ftimage.h * docs/CHANGES: Updated. 2008-12-18 06:32:10 +00:00
ftincrem.h Improve navigation in API reference. 2008-06-26 19:56:51 +00:00
ftlcdfil.h * autogen.sh, builds/unix/configure.raw, 2008-09-12 16:27:48 +00:00
ftlist.h Improve navigation in API reference. 2008-06-26 19:56:51 +00:00
ftlzw.h Improve navigation in API reference. 2008-06-26 19:56:51 +00:00
ftmac.h Improve navigation in API reference. 2008-06-26 19:56:51 +00:00
ftmm.h Improve navigation in API reference. 2008-06-26 19:56:51 +00:00
ftmodapi.h * devel/ftoption.h, include/freetype/config/ftoption.h 2008-11-05 14:34:29 +00:00
ftmoderr.h * docs/CHANGES, docs/INSTALL.ANY: Updated. 2005-03-23 16:45:24 +00:00
ftotval.h Improve navigation in API reference. 2008-06-26 19:56:51 +00:00
ftoutln.h Improve documentation of FT_Outline_Embolden. 2008-12-17 10:15:43 +00:00
ftpfr.h Improve navigation in API reference. 2008-06-26 19:56:51 +00:00
ftrender.h Improve navigation in API reference. 2008-06-26 19:56:51 +00:00
ftsizes.h Improve navigation in API reference. 2008-06-26 19:56:51 +00:00
ftsnames.h Improve navigation in API reference. 2008-06-26 19:56:51 +00:00
ftstroke.h * src/cff/cffgload.h, src/cff/cffgload.c 2008-09-16 07:25:31 +00:00
ftsynth.h * include/freetype/ftsynth.h, src/basae/ftsynth.c: Move 2008-12-17 10:50:31 +00:00
ftsystem.h Improve navigation in API reference. 2008-06-26 19:56:51 +00:00
fttrigon.h More typo fixes from Alexei. 2007-01-30 23:08:50 +00:00
fttypes.h Improve navigation in API reference. 2008-06-26 19:56:51 +00:00
ftwinfnt.h Improve navigation in API reference. 2008-06-26 19:56:51 +00:00
ftxf86.h Improve navigation in API reference. 2008-06-26 19:56:51 +00:00
t1tables.h * docs/CHANGES: Updated. 2008-12-18 06:32:10 +00:00
ttnameid.h * src/sfnt/sfobjs.c (sfnt_load_face): Remove #if 0/#endif guards 2008-11-08 22:00:55 +00:00
tttables.h Improve navigation in API reference. 2008-06-26 19:56:51 +00:00
tttags.h formatting 2008-10-05 06:08:40 +00:00
ttunpat.h * src/tools/docmaker/sources.py (re_source_keywords): Add word 2006-05-12 08:00:13 +00:00