From 27215f1c64457c50a5e1a5b2790bf2b9e73d3c4e Mon Sep 17 00:00:00 2001 From: Matthias Kramm Date: Tue, 30 Mar 2010 17:18:59 -0700 Subject: [PATCH] fixed compiler warning --- lib/png.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/png.c b/lib/png.c index 7190553..5895269 100644 --- a/lib/png.c +++ b/lib/png.c @@ -1443,11 +1443,11 @@ static int png_apply_filter(unsigned char*dest, unsigned char*src, int width, in int png_apply_filter_8(unsigned char*dest, unsigned char*src, int width, int y) { - png_apply_filter(dest, src, width, y, 8); + return png_apply_filter(dest, src, width, y, 8); } int png_apply_filter_32(unsigned char*dest, unsigned char*src, int width, int y) { - png_apply_filter(dest, src, width, y, 32); + return png_apply_filter(dest, src, width, y, 32); } EXPORT void savePNG(const char*filename, unsigned char*data, int width, int height, int numcolors) @@ -1458,8 +1458,6 @@ EXPORT void savePNG(const char*filename, unsigned char*data, int width, int heig unsigned char format; unsigned char tmp; unsigned char* data2=0; - u32 datalen; - u32 datalen2; unsigned char head[] = {137,80,78,71,13,10,26,10}; // PNG header int cols; char alpha = 1; @@ -1496,8 +1494,6 @@ EXPORT void savePNG(const char*filename, unsigned char*data, int width, int heig png_quantize_image(data, width*height, numcolors, &data, palette); } - datalen = (width*height*bpp/8+cols*8); - fi = fopen(filename, "wb"); if(!fi) { perror("open"); -- 1.7.10.4