From 86e041b5a8de508bbfa2d2b3452a5b1dcaa46952 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Sat, 21 Mar 2009 08:51:44 +0100 Subject: [PATCH] Remove redundant header inclusions. This covers many Ghostscript Coverity issues. * src/*: Do it. --- ChangeLog | 8 ++++++++ src/autofit/afloader.c | 3 +-- src/cache/ftcbasic.c | 3 +-- src/cache/ftccmap.c | 1 - src/cache/ftcglyph.c | 4 +--- src/cff/cffdrivr.c | 1 - src/cff/cffgload.c | 2 -- src/cid/cidparse.c | 3 +-- src/cid/cidriver.c | 1 - src/pcf/pcfread.c | 1 - src/pfr/pfrcmap.c | 3 +-- src/psaux/afmparse.c | 3 +-- src/psaux/psconv.c | 4 +--- src/sfnt/ttkern.c | 1 - src/sfnt/ttpost.c | 3 +-- src/truetype/ttdriver.c | 3 +-- src/truetype/ttgxvar.c | 1 - src/truetype/ttobjs.c | 2 -- src/type1/t1parse.c | 3 +-- src/type42/t42objs.c | 4 ++-- src/type42/t42parse.c | 1 - 21 files changed, 20 insertions(+), 35 deletions(-) diff --git a/ChangeLog b/ChangeLog index ace7524c0..2a8f09fe5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-03-21 Werner Lemberg + + Remove redundant header inclusions. + + This covers many Ghostscript Coverity issues. + + * src/*: Do it. + 2009-03-21 Werner Lemberg Fix Ghostscript Coverity issue #3904. diff --git a/src/autofit/afloader.c b/src/autofit/afloader.c index 4e48c2fe9..45f4a2538 100644 --- a/src/autofit/afloader.c +++ b/src/autofit/afloader.c @@ -4,7 +4,7 @@ /* */ /* Auto-fitter glyph loading routines (body). */ /* */ -/* Copyright 2003, 2004, 2005, 2006, 2007, 2008 by */ +/* Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -19,7 +19,6 @@ #include "afloader.h" #include "afhints.h" #include "afglobal.h" -#include "aflatin.h" #include "aferrors.h" diff --git a/src/cache/ftcbasic.c b/src/cache/ftcbasic.c index a568b975b..0340ffe38 100644 --- a/src/cache/ftcbasic.c +++ b/src/cache/ftcbasic.c @@ -4,7 +4,7 @@ /* */ /* The FreeType basic cache interface (body). */ /* */ -/* Copyright 2003, 2004, 2005, 2006, 2007 by */ +/* Copyright 2003, 2004, 2005, 2006, 2007, 2009 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -21,7 +21,6 @@ #include "ftcglyph.h" #include "ftcimage.h" #include "ftcsbits.h" -#include FT_INTERNAL_MEMORY_H #include "ftccback.h" #include "ftcerror.h" diff --git a/src/cache/ftccmap.c b/src/cache/ftccmap.c index 70f60e2e6..420005985 100644 --- a/src/cache/ftccmap.c +++ b/src/cache/ftccmap.c @@ -22,7 +22,6 @@ #include "ftcmanag.h" #include FT_INTERNAL_MEMORY_H #include FT_INTERNAL_DEBUG_H -#include FT_TRUETYPE_IDS_H #include "ftccback.h" #include "ftcerror.h" diff --git a/src/cache/ftcglyph.c b/src/cache/ftcglyph.c index 5c03abe05..2f462a2f6 100644 --- a/src/cache/ftcglyph.c +++ b/src/cache/ftcglyph.c @@ -4,7 +4,7 @@ /* */ /* FreeType Glyph Image (FT_Glyph) cache (body). */ /* */ -/* Copyright 2000-2001, 2003, 2004, 2006 by */ +/* Copyright 2000-2001, 2003, 2004, 2006, 2009 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -20,8 +20,6 @@ #include FT_CACHE_H #include "ftcglyph.h" #include FT_ERRORS_H -#include FT_INTERNAL_OBJECTS_H -#include FT_INTERNAL_DEBUG_H #include "ftccback.h" #include "ftcerror.h" diff --git a/src/cff/cffdrivr.c b/src/cff/cffdrivr.c index 3dd86f2aa..b3a5f48b3 100644 --- a/src/cff/cffdrivr.c +++ b/src/cff/cffdrivr.c @@ -21,7 +21,6 @@ #include FT_INTERNAL_DEBUG_H #include FT_INTERNAL_STREAM_H #include FT_INTERNAL_SFNT_H -#include FT_TRUETYPE_IDS_H #include FT_SERVICE_CID_H #include FT_SERVICE_POSTSCRIPT_CMAPS_H #include FT_SERVICE_POSTSCRIPT_INFO_H diff --git a/src/cff/cffgload.c b/src/cff/cffgload.c index 2718a277b..0bd297b81 100644 --- a/src/cff/cffgload.c +++ b/src/cff/cffgload.c @@ -18,11 +18,9 @@ #include #include FT_INTERNAL_DEBUG_H -#include FT_INTERNAL_CALC_H #include FT_INTERNAL_STREAM_H #include FT_INTERNAL_SFNT_H #include FT_OUTLINE_H -#include FT_TRUETYPE_TAGS_H #include FT_INTERNAL_POSTSCRIPT_HINTS_H #include "cffobjs.h" diff --git a/src/cid/cidparse.c b/src/cid/cidparse.c index bb87afc58..92aa1543e 100644 --- a/src/cid/cidparse.c +++ b/src/cid/cidparse.c @@ -4,7 +4,7 @@ /* */ /* CID-keyed Type1 parser (body). */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007 by */ +/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -18,7 +18,6 @@ #include #include FT_INTERNAL_DEBUG_H -#include FT_INTERNAL_CALC_H #include FT_INTERNAL_OBJECTS_H #include FT_INTERNAL_STREAM_H diff --git a/src/cid/cidriver.c b/src/cid/cidriver.c index b41d5d6f0..3a2d22532 100644 --- a/src/cid/cidriver.c +++ b/src/cid/cidriver.c @@ -20,7 +20,6 @@ #include "cidriver.h" #include "cidgload.h" #include FT_INTERNAL_DEBUG_H -#include FT_INTERNAL_STREAM_H #include "ciderrs.h" diff --git a/src/pcf/pcfread.c b/src/pcf/pcfread.c index 8e04c57b3..caa884471 100644 --- a/src/pcf/pcfread.c +++ b/src/pcf/pcfread.c @@ -32,7 +32,6 @@ THE SOFTWARE. #include FT_INTERNAL_OBJECTS_H #include "pcf.h" -#include "pcfdrivr.h" #include "pcfread.h" #include "pcferror.h" diff --git a/src/pfr/pfrcmap.c b/src/pfr/pfrcmap.c index d4656d1b5..7046b391e 100644 --- a/src/pfr/pfrcmap.c +++ b/src/pfr/pfrcmap.c @@ -4,7 +4,7 @@ /* */ /* FreeType PFR cmap handling (body). */ /* */ -/* Copyright 2002, 2007 by */ +/* Copyright 2002, 2007, 2009 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -18,7 +18,6 @@ #include "pfrcmap.h" #include "pfrobjs.h" -#include FT_INTERNAL_DEBUG_H #include "pfrerror.h" diff --git a/src/psaux/afmparse.c b/src/psaux/afmparse.c index 63a786e88..0f79f72a4 100644 --- a/src/psaux/afmparse.c +++ b/src/psaux/afmparse.c @@ -4,7 +4,7 @@ /* */ /* AFM parser (body). */ /* */ -/* Copyright 2006, 2007, 2008 by */ +/* Copyright 2006, 2007, 2008, 2009 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -18,7 +18,6 @@ #include #include FT_FREETYPE_H #include FT_INTERNAL_POSTSCRIPT_AUX_H -#include FT_INTERNAL_DEBUG_H #include "afmparse.h" #include "psconv.h" diff --git a/src/psaux/psconv.c b/src/psaux/psconv.c index d824b5913..ef85ca3d5 100644 --- a/src/psaux/psconv.c +++ b/src/psaux/psconv.c @@ -4,7 +4,7 @@ /* */ /* Some convenience conversions (body). */ /* */ -/* Copyright 2006, 2008 by */ +/* Copyright 2006, 2008, 2009 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -18,10 +18,8 @@ #include #include FT_INTERNAL_POSTSCRIPT_AUX_H -#include FT_INTERNAL_DEBUG_H #include "psconv.h" -#include "psobjs.h" #include "psauxerr.h" diff --git a/src/sfnt/ttkern.c b/src/sfnt/ttkern.c index 67d5115e8..aa899276b 100644 --- a/src/sfnt/ttkern.c +++ b/src/sfnt/ttkern.c @@ -22,7 +22,6 @@ #include FT_INTERNAL_STREAM_H #include FT_TRUETYPE_TAGS_H #include "ttkern.h" -#include "ttload.h" #include "sferrors.h" diff --git a/src/sfnt/ttpost.c b/src/sfnt/ttpost.c index ce628e210..aa0bf1ec4 100644 --- a/src/sfnt/ttpost.c +++ b/src/sfnt/ttpost.c @@ -5,7 +5,7 @@ /* Postcript name table processing for TrueType and OpenType fonts */ /* (body). */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2006, 2007, 2008 by */ +/* Copyright 1996-2001, 2002, 2003, 2006, 2007, 2008, 2009 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -29,7 +29,6 @@ #include FT_INTERNAL_STREAM_H #include FT_TRUETYPE_TAGS_H #include "ttpost.h" -#include "ttload.h" #include "sferrors.h" diff --git a/src/truetype/ttdriver.c b/src/truetype/ttdriver.c index 42feb05ed..d59233894 100644 --- a/src/truetype/ttdriver.c +++ b/src/truetype/ttdriver.c @@ -4,7 +4,7 @@ /* */ /* TrueType font driver implementation (body). */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by */ +/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -20,7 +20,6 @@ #include FT_INTERNAL_DEBUG_H #include FT_INTERNAL_STREAM_H #include FT_INTERNAL_SFNT_H -#include FT_TRUETYPE_IDS_H #include FT_SERVICE_XFREE86_NAME_H #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT diff --git a/src/truetype/ttgxvar.c b/src/truetype/ttgxvar.c index e5888170a..af4607b97 100644 --- a/src/truetype/ttgxvar.c +++ b/src/truetype/ttgxvar.c @@ -48,7 +48,6 @@ #include FT_CONFIG_CONFIG_H #include FT_INTERNAL_STREAM_H #include FT_INTERNAL_SFNT_H -#include FT_TRUETYPE_IDS_H #include FT_TRUETYPE_TAGS_H #include FT_MULTIPLE_MASTERS_H diff --git a/src/truetype/ttobjs.c b/src/truetype/ttobjs.c index 2649a670d..b125d61a0 100644 --- a/src/truetype/ttobjs.c +++ b/src/truetype/ttobjs.c @@ -18,9 +18,7 @@ #include #include FT_INTERNAL_DEBUG_H -#include FT_INTERNAL_CALC_H #include FT_INTERNAL_STREAM_H -#include FT_TRUETYPE_IDS_H #include FT_TRUETYPE_TAGS_H #include FT_INTERNAL_SFNT_H diff --git a/src/type1/t1parse.c b/src/type1/t1parse.c index 36f5c82c8..9a421665f 100644 --- a/src/type1/t1parse.c +++ b/src/type1/t1parse.c @@ -4,7 +4,7 @@ /* */ /* Type 1 parser (body). */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2008 by */ +/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2008, 2009 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -35,7 +35,6 @@ #include #include FT_INTERNAL_DEBUG_H -#include FT_INTERNAL_CALC_H #include FT_INTERNAL_STREAM_H #include FT_INTERNAL_POSTSCRIPT_AUX_H diff --git a/src/type42/t42objs.c b/src/type42/t42objs.c index 16e9809ce..f2a8f95da 100644 --- a/src/type42/t42objs.c +++ b/src/type42/t42objs.c @@ -4,7 +4,8 @@ /* */ /* Type 42 objects manager (body). */ /* */ -/* Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008 by Roberto Alameda. */ +/* Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 */ +/* by Roberto Alameda. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ @@ -19,7 +20,6 @@ #include "t42parse.h" #include "t42error.h" #include FT_INTERNAL_DEBUG_H -#include FT_INTERNAL_STREAM_H #include FT_LIST_H diff --git a/src/type42/t42parse.c b/src/type42/t42parse.c index b9e408c45..295bd14bc 100644 --- a/src/type42/t42parse.c +++ b/src/type42/t42parse.c @@ -20,7 +20,6 @@ #include "t42error.h" #include FT_INTERNAL_DEBUG_H #include FT_INTERNAL_STREAM_H -#include FT_LIST_H #include FT_INTERNAL_POSTSCRIPT_AUX_H