diff options
author | Keith Packard <keithp@keithp.com> | 2015-12-07 15:46:13 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2015-12-08 20:36:38 -0800 |
commit | eb67d10ae82b364a4324e96ce53baaa4e5e75f97 (patch) | |
tree | f02278d58e2326e35dcdc5640ea6f44f02eda909 /src/bitmap | |
parent | d6877a7c1c35985f6a75b6cd4e814595e781adc4 (diff) |
Add compiler warning flags and fix warnings
Mostly signed vs unsigned comparisons
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/bitmap')
-rw-r--r-- | src/bitmap/bdfread.c | 4 | ||||
-rw-r--r-- | src/bitmap/pcfread.c | 1 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/bitmap/bdfread.c b/src/bitmap/bdfread.c index eccd7b7..f343eed 100644 --- a/src/bitmap/bdfread.c +++ b/src/bitmap/bdfread.c @@ -298,7 +298,7 @@ bdfReadCharacters(FontFilePtr file, FontPtr pFont, bdfFileState *pState, bdfError("invalid number of CHARS in BDF file\n"); return (FALSE); } - if (nchars > INT32_MAX / sizeof(CharInfoRec)) { + if (nchars > (signed) (INT32_MAX / sizeof(CharInfoRec))) { bdfError("Couldn't allocate pCI (%d*%d)\n", nchars, (int) sizeof(CharInfoRec)); goto BAILOUT; @@ -631,7 +631,7 @@ bdfReadProperties(FontFilePtr file, FontPtr pFont, bdfFileState *pState) } if ((sscanf((char *) line, "STARTPROPERTIES %d", &nProps) != 1) || (nProps <= 0) || - (nProps > ((INT32_MAX / sizeof(FontPropRec)) - BDF_GENPROPS))) { + (nProps > (signed) ((INT32_MAX / sizeof(FontPropRec)) - BDF_GENPROPS))) { bdfError("bad 'STARTPROPERTIES'\n"); return (FALSE); } diff --git a/src/bitmap/pcfread.c b/src/bitmap/pcfread.c index 34eeeb7..33871ae 100644 --- a/src/bitmap/pcfread.c +++ b/src/bitmap/pcfread.c @@ -487,7 +487,6 @@ pcfReadFont(FontPtr pFont, FontFilePtr file, for (i = 0; i < GLYPHPADOPTIONS; i++) { bitmapSizes[i] = pcfGetINT32(file, format); if (IS_EOF(file)) goto Bail; - if (bitmapSizes[i] < 0) goto Bail; } sizebitmaps = bitmapSizes[PCF_GLYPH_PAD_INDEX(format)]; |