summaryrefslogtreecommitdiffstats
path: root/generic/tkImgGIF.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tkImgGIF.c')
-rw-r--r--generic/tkImgGIF.c30
1 files changed, 19 insertions, 11 deletions
diff --git a/generic/tkImgGIF.c b/generic/tkImgGIF.c
index c16ca11..cece744 100644
--- a/generic/tkImgGIF.c
+++ b/generic/tkImgGIF.c
@@ -351,9 +351,12 @@ FileMatchGIF(
int *widthPtr, int *heightPtr,
/* The dimensions of the image are returned
* here if the file is a valid raw GIF file. */
- Tcl_Interp *interp) /* not used */
+ Tcl_Interp *dummy) /* not used */
{
GIFImageConfig gifConf;
+ (void)fileName;
+ (void)format;
+ (void)dummy;
memset(&gifConf, 0, sizeof(GIFImageConfig));
return ReadGIFHeader(&gifConf, chan, widthPtr, heightPtr);
@@ -597,7 +600,7 @@ FileReadGIF(
goto error;
}
nBytes = fileWidth * fileHeight * 3;
- trashBuffer = ckalloc(nBytes);
+ trashBuffer = (unsigned char *)ckalloc(nBytes);
if (trashBuffer) {
memset(trashBuffer, 0, nBytes);
}
@@ -692,7 +695,7 @@ FileReadGIF(
goto error;
}
nBytes = block.pitch * imageHeight;
- block.pixelPtr = ckalloc(nBytes);
+ block.pixelPtr = (unsigned char *)ckalloc(nBytes);
if (block.pixelPtr) {
memset(block.pixelPtr, 0, nBytes);
}
@@ -754,11 +757,13 @@ StringMatchGIF(
Tcl_Obj *format, /* the image format object, or NULL */
int *widthPtr, /* where to put the string width */
int *heightPtr, /* where to put the string height */
- Tcl_Interp *interp) /* not used */
+ Tcl_Interp *dummy) /* not used */
{
unsigned char *data, header[10];
TkSizeT got, length;
MFile handle;
+ (void)format;
+ (void)dummy;
data = TkGetByteArrayFromObj(dataObj, &length);
@@ -1035,15 +1040,17 @@ ReadImage(
{
unsigned char initialCodeSize;
int xpos = 0, ypos = 0, pass = 0, i, count;
- register unsigned char *pixelPtr;
+ unsigned char *pixelPtr;
static const int interlaceStep[] = { 8, 8, 4, 2 };
static const int interlaceStart[] = { 0, 4, 2, 1 };
unsigned short prefix[(1 << MAX_LWZ_BITS)];
unsigned char append[(1 << MAX_LWZ_BITS)];
unsigned char stack[(1 << MAX_LWZ_BITS)*2];
- register unsigned char *top;
+ unsigned char *top;
int codeSize, clearCode, inCode, endCode, oldCode, maxCode;
int code, firstCode, v;
+ (void)srcX;
+ (void)srcY;
/*
* Initialize the decoder
@@ -1679,7 +1686,7 @@ WriteToChannel(
const char *bytes,
size_t byteCount)
{
- Tcl_Channel handle = clientData;
+ Tcl_Channel handle = (Tcl_Channel)clientData;
return Tcl_Write(handle, bytes, byteCount);
}
@@ -1690,7 +1697,7 @@ WriteToByteArray(
const char *bytes,
size_t byteCount)
{
- Tcl_Obj *objPtr = clientData;
+ Tcl_Obj *objPtr = (Tcl_Obj *)clientData;
Tcl_Obj *tmpObj = Tcl_NewByteArrayObj((unsigned char *) bytes, byteCount);
Tcl_IncrRefCount(tmpObj);
@@ -1712,6 +1719,7 @@ CommonWriteGIF(
long width, height, x;
unsigned char c;
unsigned int top, left;
+ (void)format;
top = 0;
left = 0;
@@ -2157,9 +2165,9 @@ ClearHashTable( /* Reset code table. */
GIFState_t *statePtr,
int hSize)
{
- register int *hashTablePtr = statePtr->hashTable + hSize;
- register long i;
- register long m1 = -1;
+ int *hashTablePtr = statePtr->hashTable + hSize;
+ long i;
+ long m1 = -1;
i = hSize - 16;
do { /* might use Sys V memset(3) here */