summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2014-05-15 23:04:23 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2014-05-23 17:21:06 -0700
commite8d20171fe04dbdc5f97739d5a59e02f0b091ba0 (patch)
tree3da39f3fc3db965a115471aa1b154b62109cb051
parentc2b7758d268fd98e09c3e66a0e7717b47ff12a47 (diff)
Don't build unused code in bitmapfunc.c if all bitmap formats are disabled
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 <alan.coopersmith@oracle.com> Reviewed-by: RĂ©mi Cardona <remi@gentoo.org>
-rw-r--r--src/bitmap/bitmapfunc.c15
1 files changed, 15 insertions, 0 deletions
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 <X11/fonts/fntfilst.h>
#include <X11/fonts/bitmap.h>
#include <X11/fonts/fontutil.h>
+#if XFONT_BDFFORMAT
#include <X11/fonts/bdfint.h>
+#endif
+#if XFONT_PCFFORMAT
#include <X11/fonts/pcf.h>
+#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 */