diff options
Diffstat (limited to 'generic/tkImgPhoto.c')
-rw-r--r-- | generic/tkImgPhoto.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/generic/tkImgPhoto.c b/generic/tkImgPhoto.c index b09682d..aefcf50 100644 --- a/generic/tkImgPhoto.c +++ b/generic/tkImgPhoto.c @@ -17,7 +17,7 @@ * Department of Computer Science, * Australian National University. * - * RCS: @(#) $Id: tkImgPhoto.c,v 1.83 2008/10/17 23:18:37 nijtmans Exp $ + * RCS: @(#) $Id: tkImgPhoto.c,v 1.84 2008/10/28 22:33:06 nijtmans Exp $ */ #include "tkImgPhoto.h" @@ -77,7 +77,7 @@ struct SubcommandOptions { * of the OPT_* constants above. */ -static char *optionNames[] = { +static const char *optionNames[] = { "-background", "-compositingrule", "-format", @@ -229,13 +229,13 @@ PhotoFormatThreadExitProc( while (tsdPtr->oldFormatList != NULL) { freePtr = tsdPtr->oldFormatList; tsdPtr->oldFormatList = tsdPtr->oldFormatList->nextPtr; - ckfree(freePtr->name); + ckfree((char *) freePtr->name); ckfree((char *) freePtr); } while (tsdPtr->formatList != NULL) { freePtr = tsdPtr->formatList; tsdPtr->formatList = tsdPtr->formatList->nextPtr; - ckfree(freePtr->name); + ckfree((char *) freePtr->name); ckfree((char *) freePtr); } } @@ -278,7 +278,7 @@ Tk_CreateOldPhotoImageFormat( copyPtr = (Tk_PhotoImageFormat *) ckalloc(sizeof(Tk_PhotoImageFormat)); *copyPtr = *formatPtr; copyPtr->name = ckalloc((unsigned) (strlen(formatPtr->name) + 1)); - strcpy(copyPtr->name, formatPtr->name); + strcpy((char *) copyPtr->name, formatPtr->name); copyPtr->nextPtr = tsdPtr->oldFormatList; tsdPtr->oldFormatList = copyPtr; } @@ -302,7 +302,7 @@ Tk_CreatePhotoImageFormat( copyPtr = (Tk_PhotoImageFormat *) ckalloc(sizeof(Tk_PhotoImageFormat)); *copyPtr = *formatPtr; copyPtr->name = ckalloc((unsigned) (strlen(formatPtr->name) + 1)); - strcpy(copyPtr->name, formatPtr->name); + strcpy((char *)copyPtr->name, formatPtr->name); if (isupper((unsigned char) *formatPtr->name)) { copyPtr->nextPtr = tsdPtr->oldFormatList; tsdPtr->oldFormatList = copyPtr; @@ -1401,7 +1401,8 @@ ParseSubcommandOptions( { int index, c, bit, currentBit, length; int values[4], numValues, maxValues, argIndex; - char *option, **listPtr; + char *option; + const char **listPtr; for (index = *optIndexPtr; index < objc; *optIndexPtr = ++index) { /* |