diff options
author | Keith Packard <keithp@keithp.com> | 2013-11-15 21:46:15 +0900 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2014-01-29 15:20:03 -0800 |
commit | a96cc1f032a059da89319ceccb6659c8edd446fb (patch) | |
tree | 8e4aa6f868bc037f4fc036fb41f7f7844315c3f2 /include | |
parent | 2a3429413df27224ceeddd22500ce43b5431d698 (diff) |
Warning fixes.
Many const char issues.
One extra 'i' declared in ScaleFont; we can just use the same 'i' as
exists at the top level scope.
Also ignore bad-function-cast in ftfuncs.c and bitscale.c because
we're casting the return value from floor or ceil from double to
int. As floor and ceil are kinda designed to generate integer results,
it's pretty clear that we're doing what we want and that the compiler
is generating noise. I'm not sure why bad-function-cast is ever a good
warning to turn on, but I'll leave that for another day.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
Diffstat (limited to 'include')
-rw-r--r-- | include/X11/fonts/fntfil.h | 14 | ||||
-rw-r--r-- | include/X11/fonts/fontmisc.h | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/include/X11/fonts/fntfil.h b/include/X11/fonts/fntfil.h index a32df63..24be79a 100644 --- a/include/X11/fonts/fntfil.h +++ b/include/X11/fonts/fntfil.h @@ -72,12 +72,12 @@ typedef struct _FontRenderer *FontRendererPtr; #define FontAliasFile "fonts.alias" #define FontScalableFile "fonts.scale" -extern int FontFileNameCheck ( char *name ); +extern int FontFileNameCheck ( const char *name ); extern int FontFileInitFPE ( FontPathElementPtr fpe ); extern int FontFileResetFPE ( FontPathElementPtr fpe ); extern int FontFileFreeFPE ( FontPathElementPtr fpe ); extern int FontFileOpenFont ( pointer client, FontPathElementPtr fpe, - Mask flags, char *name, int namelen, + Mask flags, const char *name, int namelen, fsBitmapFormat format, fsBitmapFormatMask fmask, XID id, FontPtr *pFont, char **aliasName, FontPtr non_cachable_font ); @@ -87,14 +87,14 @@ extern int FontFileOpenBitmap ( FontPathElementPtr fpe, FontPtr *pFont, fsBitmapFormat format, fsBitmapFormatMask fmask ); extern int FontFileListFonts ( pointer client, FontPathElementPtr fpe, - char *pat, int len, int max, + const char *pat, int len, int max, FontNamesPtr names ); extern int FontFileStartListFonts ( pointer client, FontPathElementPtr fpe, - char *pat, int len, int max, + const char *pat, int len, int max, pointer *privatep, int mark_aliases ); extern int FontFileStartListFontsWithInfo ( pointer client, FontPathElementPtr fpe, - char *pat, int len, int max, + const char *pat, int len, int max, pointer *privatep ); extern int FontFileListNextFontWithInfo ( pointer client, FontPathElementPtr fpe, @@ -103,7 +103,7 @@ extern int FontFileListNextFontWithInfo ( pointer client, int *numFonts, pointer private ); extern int FontFileStartListFontsAndAliases ( pointer client, FontPathElementPtr fpe, - char *pat, int len, int max, + const char *pat, int len, int max, pointer *privatep ); extern int FontFileListNextFontOrAlias ( pointer client, FontPathElementPtr fpe, @@ -173,7 +173,7 @@ extern int FontFileMatchBitmapSource ( FontPathElementPtr fpe, fsBitmapFormatMask fmask, Bool noSpecificSize ); -extern int FontFileReadDirectory ( char *directory, FontDirectoryPtr *pdir ); +extern int FontFileReadDirectory ( const char *directory, FontDirectoryPtr *pdir ); extern Bool FontFileDirectoryChanged ( FontDirectoryPtr dir ); #endif /* _FONTFILE_H_ */ diff --git a/include/X11/fonts/fontmisc.h b/include/X11/fonts/fontmisc.h index 73a8247..d3926a7 100644 --- a/include/X11/fonts/fontmisc.h +++ b/include/X11/fonts/fontmisc.h @@ -91,7 +91,7 @@ RepadBitmap ( extern void CopyISOLatin1Lowered( char * /*dest*/, - char * /*source*/, + const char * /*source*/, int /*length*/ ); |