diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-12-20 10:41:43 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-12-20 10:41:43 (GMT) |
commit | 2f89fa96c29e874b87523d628df15c62984dd9b7 (patch) | |
tree | 512c62f76a0e9be490f422d8aa6f866cd1c0c5c3 /generic/tkImgListFormat.c | |
parent | 22f8312f1177e98133c31e059d6f1ae948178f37 (diff) | |
download | tk-2f89fa96c29e874b87523d628df15c62984dd9b7.zip tk-2f89fa96c29e874b87523d628df15c62984dd9b7.tar.gz tk-2f89fa96c29e874b87523d628df15c62984dd9b7.tar.bz2 |
Much more WIP: Appears to be working on UNIX, and for a bit part on Windows too.
Diffstat (limited to 'generic/tkImgListFormat.c')
-rw-r--r-- | generic/tkImgListFormat.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/generic/tkImgListFormat.c b/generic/tkImgListFormat.c index 2b23699..95daf53 100644 --- a/generic/tkImgListFormat.c +++ b/generic/tkImgListFormat.c @@ -196,7 +196,8 @@ ParseFormatOptions( * this struct */ { - int index, optIndex, typeIndex, first; + int index, optIndex, first; + enum ColorFormatType typeIndex; const char *option; first = 1; @@ -257,7 +258,7 @@ ParseFormatOptions( return TCL_ERROR; } if (Tcl_GetIndexFromObj(NULL, objv[index], colorFormatNames, "", - TCL_EXACT, &typeIndex) != TCL_OK + TCL_EXACT, (int *)&typeIndex) != TCL_OK || (typeIndex != COLORFORMAT_LIST && typeIndex != COLORFORMAT_RGB2 && typeIndex != COLORFORMAT_RGBA2) ) { @@ -366,6 +367,7 @@ StringMatchDef( int y, rowCount, colCount, curColCount; unsigned char dummy; Tcl_Obj **rowListPtr, *pixelData; + (void)formatString; /* * See if data can be parsed as a list, if every element is itself a valid @@ -550,7 +552,7 @@ StringReadDef( srcBlock.offset[1] = 1; srcBlock.offset[2] = 2; srcBlock.offset[3] = 3; - srcBlock.pixelPtr = attemptckalloc(srcBlock.pitch * srcBlock.height); + srcBlock.pixelPtr = (unsigned char *)attemptckalloc(srcBlock.pitch * srcBlock.height); if (srcBlock.pixelPtr == NULL) { Tcl_SetObjResult(interp, Tcl_ObjPrintf(TK_PHOTO_ALLOC_FAILURE_MESSAGE)); Tcl_SetErrorCode(interp, "TK", "MALLOC", NULL); @@ -837,7 +839,7 @@ ParseColor( */ static int ParseColorAsList( - Tcl_Interp *interp, /* not used */ + Tcl_Interp *dummy, /* not used */ const char *colorString, /* the color data to parse */ int colorStrLen, /* length of the color string */ unsigned char *redPtr, /* the result is written to these pointers */ @@ -845,7 +847,6 @@ ParseColorAsList( unsigned char *bluePtr, unsigned char *alphaPtr) { - /* * This is kinda ugly. The code would be certainly nicer if it * used Tcl_ListObjGetElements() and Tcl_GetIntFromObj(). But with @@ -855,6 +856,8 @@ ParseColorAsList( const char *curPos; int values[4]; int i; + (void)dummy; + (void)colorStrLen; curPos = colorString; i = 0; |