summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhobbs <hobbs>2004-03-16 19:52:52 (GMT)
committerhobbs <hobbs>2004-03-16 19:52:52 (GMT)
commit7988add1d4c5a53999db1b98d2623be5a1addbb1 (patch)
tree2565920b23593ae66e2118e3e8914d6c2bce46bb
parentf7eb5dd0242ff7912014727b8d21e33f69831bba (diff)
downloadtk-7988add1d4c5a53999db1b98d2623be5a1addbb1.zip
tk-7988add1d4c5a53999db1b98d2623be5a1addbb1.tar.gz
tk-7988add1d4c5a53999db1b98d2623be5a1addbb1.tar.bz2
fix cast warnings
-rw-r--r--generic/tkCanvUtil.c16
-rw-r--r--generic/tkTextImage.c4
-rw-r--r--unix/tkUnixSelect.c7
3 files changed, 14 insertions, 13 deletions
diff --git a/generic/tkCanvUtil.c b/generic/tkCanvUtil.c
index 5a8381a..ceabca4 100644
--- a/generic/tkCanvUtil.c
+++ b/generic/tkCanvUtil.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkCanvUtil.c,v 1.10 2003/01/17 19:54:09 drh Exp $
+ * RCS: @(#) $Id: tkCanvUtil.c,v 1.11 2004/03/16 19:53:18 hobbs Exp $
*/
#include "tkInt.h"
@@ -535,7 +535,7 @@ TkCanvasDashPrintProc(clientData, tkwin, widgRec, offset, freeProcPtr)
i = -i;
*freeProcPtr = TCL_DYNAMIC;
buffer = (char *) ckalloc((unsigned int) (i+1));
- p = (i > sizeof(char *)) ? dash->pattern.pt : dash->pattern.array;
+ p = (i > (int)sizeof(char *)) ? dash->pattern.pt : dash->pattern.array;
memcpy(buffer, p, (unsigned int) i);
buffer[i] = 0;
return buffer;
@@ -546,7 +546,7 @@ TkCanvasDashPrintProc(clientData, tkwin, widgRec, offset, freeProcPtr)
buffer = (char *)ckalloc((unsigned int) (4*i));
*freeProcPtr = TCL_DYNAMIC;
- p = (i > sizeof(char *)) ? dash->pattern.pt : dash->pattern.array;
+ p = (i > (int)sizeof(char *)) ? dash->pattern.pt : dash->pattern.array;
sprintf(buffer, "%d", *p++ & 0xff);
while(--i) {
sprintf(buffer+strlen(buffer), " %d", *p++ & 0xff);
@@ -800,7 +800,7 @@ Tk_GetDash(interp, value, dash)
} else {
goto badDashList;
}
- if (i > sizeof(char *)) {
+ if (i > (int)sizeof(char *)) {
dash->pattern.pt = pt = (char *) ckalloc(strlen(value));
} else {
pt = dash->pattern.array;
@@ -828,7 +828,7 @@ Tk_GetDash(interp, value, dash)
if (ABS(dash->number) > sizeof(char *)) {
ckfree((char *) dash->pattern.pt);
}
- if (argc > sizeof(char *)) {
+ if (argc > (int)sizeof(char *)) {
dash->pattern.pt = pt = (char *) ckalloc((unsigned int) argc);
} else {
pt = dash->pattern.array;
@@ -1140,14 +1140,14 @@ Tk_ChangeOutlineGC(canvas, item, outline)
char *q;
int i = -dash->number;
- p = (i > sizeof(char *)) ? dash->pattern.pt : dash->pattern.array;
+ p = (i > (int)sizeof(char *)) ? dash->pattern.pt : dash->pattern.array;
q = (char *) ckalloc(2*(unsigned int)i);
i = DashConvert(q, p, i, width);
XSetDashes(((TkCanvas *)canvas)->display, outline->gc, outline->offset, q, i);
ckfree(q);
} else if ( dash->number>2 || (dash->number==2 &&
(dash->pattern.array[0]!=dash->pattern.array[1]))) {
- p = (char *) (dash->number > sizeof(char *)) ? dash->pattern.pt : dash->pattern.array;
+ p = (char *) (dash->number > (int)sizeof(char *)) ? dash->pattern.pt : dash->pattern.array;
XSetDashes(((TkCanvas *)canvas)->display, outline->gc, outline->offset, p, dash->number);
}
if (stipple!=None) {
@@ -1629,7 +1629,7 @@ TkCanvTranslatePath (canvPtr, numVertex, coordArr, closedPath, outArr)
** as coordArr[] requires. Divide this space into two separate arrays
** a[] and b[]. Initialize a[] to be equal to coordArr[].
*/
- if( numVertex*12 <= sizeof(staticSpace)/sizeof(staticSpace[0]) ){
+ if( numVertex*12 <= (int)(sizeof(staticSpace)/sizeof(staticSpace[0])) ){
tempArr = staticSpace;
} else {
tempArr = (double*)ckalloc( numVertex*12*sizeof(tempArr[0]) );
diff --git a/generic/tkTextImage.c b/generic/tkTextImage.c
index 50e86be..87cdb2e 100644
--- a/generic/tkTextImage.c
+++ b/generic/tkTextImage.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkTextImage.c,v 1.12 2004/01/13 02:06:00 davygrvy Exp $
+ * RCS: @(#) $Id: tkTextImage.c,v 1.13 2004/03/16 19:53:09 hobbs Exp $
*/
#include "tk.h"
@@ -391,7 +391,7 @@ EmbImageConfigure(textPtr, eiPtr, objc, objv)
if (new > count) {
count = new;
}
- if (len == (int) strlen(haveName)) {
+ if (len == strlen(haveName)) {
conflict = 1;
}
}
diff --git a/unix/tkUnixSelect.c b/unix/tkUnixSelect.c
index 3920dcb..a67e97d 100644
--- a/unix/tkUnixSelect.c
+++ b/unix/tkUnixSelect.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkUnixSelect.c,v 1.12 2004/01/13 02:06:01 davygrvy Exp $
+ * RCS: @(#) $Id: tkUnixSelect.c,v 1.13 2004/03/16 19:52:52 hobbs Exp $
*/
#include "tkInt.h"
@@ -247,7 +247,8 @@ TkSelPropProc(eventPtr)
{
register IncrInfo *incrPtr;
register TkSelHandler *selPtr;
- int i, length, numItems;
+ int length, numItems;
+ unsigned long i;
Atom target, formatType;
long buffer[TK_SEL_WORDS_AT_ONCE];
TkDisplay *dispPtr = TkGetDisplay(eventPtr->xany.display);
@@ -802,7 +803,7 @@ ConvertSelection(winPtr, eventPtr)
IncrInfo incr; /* State of selection conversion. */
Atom singleInfo[2]; /* incr.multAtoms points here except
* for multiple conversions. */
- int i;
+ unsigned long i;
Tk_ErrorHandler errorHandler;
TkSelectionInfo *infoPtr;
TkSelInProgress ip;