From e8d20171fe04dbdc5f97739d5a59e02f0b091ba0 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Thu, 15 May 2014 23:04:23 -0700 Subject: Don't build unused code in bitmapfunc.c if all bitmap formats are disabled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If the only bitmaps we support are builtins, don't need the code to register all the bitmap font file handlers. Fixes gcc warnings: bitmapfunc.c:110:1: warning: 'BitmapOpenBitmap' defined but not used [-Wunused-function] BitmapOpenBitmap (FontPathElementPtr fpe, FontPtr *ppFont, int flags, ^ bitmapfunc.c:155:1: warning: 'BitmapGetInfoBitmap' defined but not used [-Wunused-function] BitmapGetInfoBitmap (FontPathElementPtr fpe, FontInfoPtr pFontInfo, ^ Signed-off-by: Alan Coopersmith Reviewed-by: RĂ©mi Cardona --- src/bitmap/bitmapfunc.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/bitmap/bitmapfunc.c b/src/bitmap/bitmapfunc.c index d942b42..8c6b3d8 100644 --- a/src/bitmap/bitmapfunc.c +++ b/src/bitmap/bitmapfunc.c @@ -35,10 +35,17 @@ in this Software without prior written authorization from The Open Group. #include #include #include +#if XFONT_BDFFORMAT #include +#endif +#if XFONT_PCFFORMAT #include +#endif +#if XFONT_SNFFORMAT #include "snfstr.h" +#endif +#if XFONT_PCFFORMAT || XFONT_SNFFORMAT || XFONT_BDFFORMAT typedef struct _BitmapFileFunctions { int (*ReadFont) (FontPtr /* pFont */, FontFilePtr /* file */, int /* bit */, int /* byte */, @@ -236,3 +243,11 @@ BitmapGetRenderIndex(FontRendererPtr renderer) { return renderer - renderers; } + +#else +void +BitmapRegisterFontFileFunctions (void) +{ + /* nothing to do */ +} +#endif /* XFONT_PCFFORMAT || XFONT_SNFFORMAT || XFONT_BDFFORMAT */ -- cgit v1.2.3