bug 124117 r=pavlov sr=tor a=shaver

Fix build warnings in the GIF Decoder
This commit is contained in:
cbiesinger%web.de 2002-02-21 14:08:25 +00:00
parent 33fb0161db
commit 9f6f6bd8ee
3 changed files with 50 additions and 48 deletions

View File

@ -219,7 +219,7 @@ output_row(gif_struct *gs)
if (width > 0)
if (gs->GIFCallback_HaveDecodedRow) {
/* Decoded data available callback */
int result = (gs->GIFCallback_HaveDecodedRow)(
(gs->GIFCallback_HaveDecodedRow)(
gs->clientptr,
gs->rowbuf, /* Pointer to single scanline temporary buffer */
gs->x_offset, /* x offset with respect to GIF logical screen origin */
@ -1420,7 +1420,7 @@ PRStatus gif_write(gif_struct *gs, const PRUint8 *buf, PRUint32 len)
case gif_done:
if (gs->GIFCallback_EndGIF) {
int result = (gs->GIFCallback_EndGIF)(gs->clientptr, gs->loop_count);
(gs->GIFCallback_EndGIF)(gs->clientptr, gs->loop_count);
}
return PR_SUCCESS;
break;
@ -1493,7 +1493,7 @@ PRStatus gif_write(gif_struct *gs, const PRUint8 *buf, PRUint32 len)
// Handle general errors
case gif_error:
if (gs->GIFCallback_EndGIF) {
int result = (gs->GIFCallback_EndGIF)(gs->clientptr, gs->loop_count);
(gs->GIFCallback_EndGIF)(gs->clientptr, gs->loop_count);
}
return PR_FAILURE;
break;
@ -1522,7 +1522,7 @@ gif_destroy(gif_struct *gs)
/* Clear any pending timeouts */
if (gs->delay_time) {
//ic->imgdcb->ImgDCBClearTimeout(gs->delay_timeout);
gs->delay_time = NULL;
gs->delay_time = 0;
}
gif_destroy_transparency(gs);

View File

@ -33,6 +33,52 @@
#include "nsRect.h"
//////////////////////////////////////////////////////////////////////
// Declaration of the static callbacks
static int PR_CALLBACK BeginGIF(
void* aClientData,
PRUint32 aLogicalScreenWidth,
PRUint32 aLogicalScreenHeight,
PRUint8 aBackgroundRGBIndex);
static int PR_CALLBACK HaveDecodedRow(
void* aClientData,
PRUint8* aRowBufPtr, // Pointer to single scanline temporary buffer
int aXOffset, // With respect to GIF logical screen origin
int aLength, // Length of the row?
int aRow, // Row number?
int aDuplicateCount, // Number of times to duplicate the row?
PRUint8 aDrawMode, // il_draw_mode
int aInterlacePass);
static int PR_CALLBACK NewPixmap();
static int PR_CALLBACK EndGIF(
void* aClientData,
int aAnimationLoopCount);
static int PR_CALLBACK BeginImageFrame(
void* aClientData,
PRUint32 aFrameNumber, /* Frame number, 1-n */
PRUint32 aFrameXOffset, /* X offset in logical screen */
PRUint32 aFrameYOffset, /* Y offset in logical screen */
PRUint32 aFrameWidth,
PRUint32 aFrameHeight,
GIF_RGB* aTransparencyChromaKey);
static int PR_CALLBACK EndImageFrame(
void* aClientData,
PRUint32 aFrameNumber,
PRUint32 aDelayTimeout,
PRUint32 aDisposal);
static int PR_CALLBACK SetupColorspaceConverter();
static int PR_CALLBACK ResetPalette();
static int PR_CALLBACK InitTransparentPixel();
static int PR_CALLBACK DestroyTransparentPixel();
static int PR_CALLBACK HaveImageAll(
void* aClientData);
//////////////////////////////////////////////////////////////////////
// GIF Decoder Implementation
// This is an adaptor between GIF2 and imgIDecoder
@ -397,7 +443,6 @@ int HaveDecodedRow(
nscoord width;
decoder->mImageFrame->GetWidth(&width);
PRUint32 iwidth = width;
gfx_format format;
decoder->mImageFrame->GetFormat(&format);

View File

@ -71,47 +71,4 @@ public:
PRUint8 mLastFlushedPass;
};
// static callbacks for the GIF decoder
static int PR_CALLBACK BeginGIF(
void* aClientData,
PRUint32 aLogicalScreenWidth,
PRUint32 aLogicalScreenHeight,
PRUint8 aBackgroundRGBIndex);
static int PR_CALLBACK HaveDecodedRow(
void* aClientData,
PRUint8* aRowBufPtr, // Pointer to single scanline temporary buffer
int aXOffset, // With respect to GIF logical screen origin
int aLength, // Length of the row?
int aRow, // Row number?
int aDuplicateCount, // Number of times to duplicate the row?
PRUint8 aDrawMode, // il_draw_mode
int aInterlacePass);
static int PR_CALLBACK NewPixmap();
static int PR_CALLBACK EndGIF(
void* aClientData,
int aAnimationLoopCount);
static int PR_CALLBACK BeginImageFrame(
void* aClientData,
PRUint32 aFrameNumber, /* Frame number, 1-n */
PRUint32 aFrameXOffset, /* X offset in logical screen */
PRUint32 aFrameYOffset, /* Y offset in logical screen */
PRUint32 aFrameWidth,
PRUint32 aFrameHeight,
GIF_RGB* aTransparencyChromaKey);
static int PR_CALLBACK EndImageFrame(
void* aClientData,
PRUint32 aFrameNumber,
PRUint32 aDelayTimeout,
PRUint32 aDisposal);
static int PR_CALLBACK SetupColorspaceConverter();
static int PR_CALLBACK ResetPalette();
static int PR_CALLBACK InitTransparentPixel();
static int PR_CALLBACK DestroyTransparentPixel();
static int PR_CALLBACK HaveImageAll(
void* aClientData);
#endif