From de5c5f505cb34caac65e24f2f9b9f62e8982f440 Mon Sep 17 00:00:00 2001 From: das Date: Tue, 11 Mar 2008 22:31:19 +0000 Subject: * generic/tkCanvUtil.c: fix gcc-4.2 warnings. --- generic/tkCanvUtil.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/generic/tkCanvUtil.c b/generic/tkCanvUtil.c index ae2050b..e0c9a3a 100644 --- a/generic/tkCanvUtil.c +++ b/generic/tkCanvUtil.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: tkCanvUtil.c,v 1.18 2007/12/13 15:24:13 dgp Exp $ + * RCS: @(#) $Id: tkCanvUtil.c,v 1.19 2008/03/11 22:31:19 das Exp $ */ #include "tkInt.h" @@ -897,7 +897,7 @@ Tk_GetDash( goto badDashList; } - if (ABS(dash->number) > sizeof(char *)) { + if ((unsigned int)ABS(dash->number) > sizeof(char *)) { ckfree((char *) dash->pattern.pt); } if (argc > (int)sizeof(char *)) { @@ -938,7 +938,7 @@ Tk_GetDash( if (argv != NULL) { ckfree((char *) argv); } - if (ABS(dash->number) > sizeof(char *)) { + if ((unsigned int)ABS(dash->number) > sizeof(char *)) { ckfree((char *) dash->pattern.pt); } dash->number = 0; @@ -1010,13 +1010,13 @@ Tk_DeleteOutline( if (outline->gc != None) { Tk_FreeGC(display, outline->gc); } - if (ABS(outline->dash.number) > sizeof(char *)) { + if ((unsigned int)ABS(outline->dash.number) > sizeof(char *)) { ckfree((char *) outline->dash.pattern.pt); } - if (ABS(outline->activeDash.number) > sizeof(char *)) { + if ((unsigned int)ABS(outline->activeDash.number) > sizeof(char *)) { ckfree((char *) outline->activeDash.pattern.pt); } - if (ABS(outline->disabledDash.number) > sizeof(char *)) { + if ((unsigned int)ABS(outline->disabledDash.number) > sizeof(char *)) { ckfree((char *) outline->disabledDash.pattern.pt); } if (outline->color != NULL) { @@ -1445,7 +1445,7 @@ Tk_CanvasPsOutline( str = (char *)ckalloc((unsigned int) (1 - 8*dash->number)); lptr = (char *)ckalloc((unsigned int) (1 - 2*dash->number)); } - ptr = (ABS(dash->number) > sizeof(char *)) ? + ptr = ((unsigned int)ABS(dash->number) > sizeof(char *)) ? dash->pattern.pt : dash->pattern.array; if (dash->number > 0) { char *ptr0 = ptr; -- cgit v0.12