diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2015-08-26 11:26:36 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2015-08-26 11:26:36 +0000 |
commit | 4f16ac0c16b928eb304c0f0ad3ff60708f0eaccc (patch) | |
tree | 018b9955409be6ae25d827030db4bfd9bf48cb3b /Build | |
parent | ffd094638c9d43a33f1e53720b88862aa5585625 (diff) |
XeTeX: More gcc warnings
git-svn-id: svn://tug.org/texlive/trunk@38211 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r-- | Build/source/texk/web2c/xetexdir/ChangeLog | 5 | ||||
-rw-r--r-- | Build/source/texk/web2c/xetexdir/image/bmpimage.c | 11 | ||||
-rw-r--r-- | Build/source/texk/web2c/xetexdir/image/mfileio.c | 2 | ||||
-rw-r--r-- | Build/source/texk/web2c/xetexdir/image/pngimage.c | 3 |
4 files changed, 11 insertions, 10 deletions
diff --git a/Build/source/texk/web2c/xetexdir/ChangeLog b/Build/source/texk/web2c/xetexdir/ChangeLog index ba1f0608824..0ba8a84a593 100644 --- a/Build/source/texk/web2c/xetexdir/ChangeLog +++ b/Build/source/texk/web2c/xetexdir/ChangeLog @@ -1,5 +1,10 @@ 2015-08-25 Peter Breitenlohner <peb@mppmu.mpg.de> + * image/bmpimage.c, image/pngimage.c: Drop set but unused vars. + * image/mfileio.c: ANSI C function definition. + +2015-08-25 Peter Breitenlohner <peb@mppmu.mpg.de> + * am/xetex.am (libxetex_a_CFLAGS): Enable gcc warnings. * XeTeX_ext.[ch], XeTeXFontInst{cpp,h}, XeTeXFontMgr.cpp, diff --git a/Build/source/texk/web2c/xetexdir/image/bmpimage.c b/Build/source/texk/web2c/xetexdir/image/bmpimage.c index 906413370a8..57b76091904 100644 --- a/Build/source/texk/web2c/xetexdir/image/bmpimage.c +++ b/Build/source/texk/web2c/xetexdir/image/bmpimage.c @@ -104,10 +104,10 @@ bmp_scan_file(struct bmp_info *info, FILE *fp) { unsigned char buf[DIB_HEADER_SIZE_MAX+4]; unsigned char *p; - long offset, fsize, hsize, compression; + long offset, hsize; long psize; /* Bytes per palette color: 3 for OS2, 4 for Win */ unsigned short bit_count; /* Bits per pix */ - int num_palette, flip; + int num_palette; unsigned long biXPelsPerMeter, biYPelsPerMeter; p = buf; @@ -128,7 +128,7 @@ bmp_scan_file(struct bmp_info *info, FILE *fp) ((b)[2] << 16) + ((b)[3] << 24)) #define USHORT_LE(b) ((b)[0] + ((b)[1] << 8)) - fsize = ULONG_LE(p); p += 4; + /* ignore fsize */ p += 4; if (ULONG_LE(p) != 0) { WARN("Not a BMP file???"); return -1; @@ -142,7 +142,6 @@ bmp_scan_file(struct bmp_info *info, FILE *fp) WARN("Could not read BMP file header..."); return -1; } - flip = 1; if (hsize == DIB_CORE_HEADER_SIZE) { info->width = USHORT_LE(p); p += 2; info->height = USHORT_LE(p); p += 2; @@ -154,7 +153,6 @@ bmp_scan_file(struct bmp_info *info, FILE *fp) } p += 2; bit_count = USHORT_LE(p); p += 2; - compression = DIB_COMPRESS_NONE; psize = 3; } else if (hsize == DIB_INFO_HEADER_SIZE || hsize == DIB_INFO_HEADER_SIZE2 || @@ -168,7 +166,7 @@ bmp_scan_file(struct bmp_info *info, FILE *fp) } p += 2; bit_count = USHORT_LE(p); p += 2; - compression = ULONG_LE(p); p += 4; + /* ignore compression */ p += 4; /* ignore biSizeImage */ p += 4; biXPelsPerMeter = ULONG_LE(p); p += 4; biYPelsPerMeter = ULONG_LE(p); p += 4; @@ -176,7 +174,6 @@ bmp_scan_file(struct bmp_info *info, FILE *fp) info->ydpi = biYPelsPerMeter * 0.0254; if (info->height < 0) { info->height = -info->height; - flip = 0; } psize = 4; } else { diff --git a/Build/source/texk/web2c/xetexdir/image/mfileio.c b/Build/source/texk/web2c/xetexdir/image/mfileio.c index f31f82e4f61..bcfa4ce1deb 100644 --- a/Build/source/texk/web2c/xetexdir/image/mfileio.c +++ b/Build/source/texk/web2c/xetexdir/image/mfileio.c @@ -64,7 +64,7 @@ int mfclose(FILE *file, const char *function, int line) } #endif -static void os_error() +static void os_error(void) { fprintf (stderr, "io: An OS command failed that should not have.\n"); exit(-1); diff --git a/Build/source/texk/web2c/xetexdir/image/pngimage.c b/Build/source/texk/web2c/xetexdir/image/pngimage.c index ec677528130..ee5f2212581 100644 --- a/Build/source/texk/web2c/xetexdir/image/pngimage.c +++ b/Build/source/texk/web2c/xetexdir/image/pngimage.c @@ -119,7 +119,7 @@ png_scan_file (struct png_info *info, FILE *png_file) /* Libpng stuff */ png_structp png_ptr; png_infop png_info_ptr; - png_byte bpc, color_type; + png_byte bpc; png_uint_32 width, height; rewind (png_file); @@ -137,7 +137,6 @@ png_scan_file (struct png_info *info, FILE *png_file) /* Read PNG info-header and get some info. */ png_read_info(png_ptr, png_info_ptr); - color_type = png_get_color_type (png_ptr, png_info_ptr); width = png_get_image_width (png_ptr, png_info_ptr); height = png_get_image_height(png_ptr, png_info_ptr); bpc = png_get_bit_depth (png_ptr, png_info_ptr); |