From fabbeba48e430b686e4d89ace79da0ecc82a9f03 Mon Sep 17 00:00:00 2001 From: "dp%netscape.com" Date: Tue, 19 Oct 1999 22:28:38 +0000 Subject: [PATCH] Fixed warnings. r=pam nunn git-svn-id: svn://10.0.0.236/trunk@51197 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/modules/libimg/pngcom/ipng.cpp | 11 +++++------ mozilla/modules/libimg/src/if.cpp | 2 +- mozilla/modules/libimg/src/scale.cpp | 13 +++++-------- 3 files changed, 11 insertions(+), 15 deletions(-) diff --git a/mozilla/modules/libimg/pngcom/ipng.cpp b/mozilla/modules/libimg/pngcom/ipng.cpp index 50c8a8eea84..81f6a33170d 100644 --- a/mozilla/modules/libimg/pngcom/ipng.cpp +++ b/mozilla/modules/libimg/pngcom/ipng.cpp @@ -30,7 +30,6 @@ #define MINIMUM_DELAY_TIME 10 -static void il_png_delay_time_callback(void *closure); static void info_callback(png_structp png_ptr, png_infop info); static void row_callback(png_structp png_ptr, png_bytep new_row, png_uint_32 row_num, int pass); @@ -121,7 +120,7 @@ il_png_write(il_container *ic, const unsigned char *buf, int32 len) return 0; } - +#if 0 static void il_png_delay_time_callback(void *closure) { @@ -137,7 +136,7 @@ il_png_delay_time_callback(void *closure) ipng_p->delay_time = 0; /* Reset for next image */ return; } - +#endif /* 0 */ #define WE_DONT_HAVE_SUBSEQUENT_IMAGES @@ -210,7 +209,7 @@ info_callback(png_structp png_ptr, png_infop info_ptr) png_uint_32 width, height; int bit_depth, color_type, interlace_type, compression_type, filter_type; int channels; - double LUT_exponent, CRT_exponent = 2.2, display_exponent, gamma; + double LUT_exponent, CRT_exponent = 2.2, display_exponent, aGamma; il_container *ic; ipng_structp ipng_p; @@ -258,8 +257,8 @@ info_callback(png_structp png_ptr, png_infop info_ptr) /* (alternatively, could check for SCREEN_GAMMA environment variable) */ display_exponent = LUT_exponent * CRT_exponent; - if (png_get_gAMA(png_ptr, info_ptr, &gamma)) - png_set_gamma(png_ptr, display_exponent, gamma); + if (png_get_gAMA(png_ptr, info_ptr, &aGamma)) + png_set_gamma(png_ptr, display_exponent, aGamma); else png_set_gamma(png_ptr, display_exponent, 0.45455); diff --git a/mozilla/modules/libimg/src/if.cpp b/mozilla/modules/libimg/src/if.cpp index ec3c45dd9b2..22574b9f56c 100644 --- a/mozilla/modules/libimg/src/if.cpp +++ b/mozilla/modules/libimg/src/if.cpp @@ -372,7 +372,7 @@ il_progress_notify(il_container *ic) return; int ret; /* Interlaced GIFs are weird */ - if (ret= nsCRT::strncasecmp(ic->type, "image/gif", 9) == 0) { + if ((ret = nsCRT::strncasecmp(ic->type, "image/gif", 9)) == 0) { percent_done = il_compute_percentage_complete(row, ic); } else diff --git a/mozilla/modules/libimg/src/scale.cpp b/mozilla/modules/libimg/src/scale.cpp index 79df6c5f3ff..16aebeb4b17 100644 --- a/mozilla/modules/libimg/src/scale.cpp +++ b/mozilla/modules/libimg/src/scale.cpp @@ -52,9 +52,6 @@ typedef struct _IL_IRGBGA { uint8 red, green, blue, gray, alpha; } IL_IRGBGA; - -static nsVoidArray *gTimeouts = NULL; - static void il_timeout_callback(void *closure) { @@ -823,7 +820,7 @@ il_emit_row( PR_ASSERT(row >= 0); - if(row >= src_header->height) { + if(row >= (int) src_header->height) { ILTRACE(2,("il: ignoring extra row (%d)", row)); return; } @@ -849,13 +846,13 @@ il_emit_row( * Except that the bottom line of pixels can never be * overwritten by a subsequent line. */ - if (d != (src_header->height - 1)) + if (d != (int) (src_header->height - 1)) return; else drow_end = drow_start; } else { drow_end = next_drow_start - 1; - if (drow_end >= img_header->height) + if (drow_end >= (int)img_header->height) drow_end = img_header->height - 1; } } @@ -876,13 +873,13 @@ il_emit_row( * Except that the right column of pixels can never be * overwritten by a subsequent column. */ - if (d != (src_header->width - 1)) + if (d != (int)(src_header->width - 1)) return; else dcolumn_end = dcolumn_start; } else { dcolumn_end = next_dcolumn_start - 1; - if (dcolumn_end >= img_header->width) + if (dcolumn_end >= (int)img_header->width) dcolumn_end = img_header->width - 1; } }