Fixed warnings. r=pam nunn

git-svn-id: svn://10.0.0.236/trunk@51197 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
dp%netscape.com
1999-10-19 22:28:38 +00:00
parent b7fab4e31c
commit fabbeba48e
3 changed files with 11 additions and 15 deletions

View File

@@ -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);

View File

@@ -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

View File

@@ -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;
}
}