summaryrefslogtreecommitdiffstats
path: root/xlib
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-04-02 09:29:47 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-04-02 09:29:47 (GMT)
commitf61ecd111ced0ae28cf4b46da371fb0942ad2532 (patch)
tree9650dab26ca35a102afdb0c08576c443ad6d5456 /xlib
parent33bde427645f8931d8634cdba1819b5e66a69bd0 (diff)
parent17693a76b350ba982a591b6dafc3f1816d9c316f (diff)
downloadtk-f61ecd111ced0ae28cf4b46da371fb0942ad2532.zip
tk-f61ecd111ced0ae28cf4b46da371fb0942ad2532.tar.gz
tk-f61ecd111ced0ae28cf4b46da371fb0942ad2532.tar.bz2
gcc warning: signed-unsigned compare
Diffstat (limited to 'xlib')
-rw-r--r--xlib/xcolors.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xlib/xcolors.c b/xlib/xcolors.c
index 7a83146..04cb1af 100644
--- a/xlib/xcolors.c
+++ b/xlib/xcolors.c
@@ -17,7 +17,7 @@
* Index array. For each of the characters 'a'-'y', this table gives the first color
* starting with that character in the xColors table.
*/
-static int az[] = {0, 4, 12, 19, 43, 43, 46, 56, 58, 60, 60, 61, 84, 99,
+static unsigned char az[] = {0, 4, 12, 19, 43, 43, 46, 56, 58, 60, 60, 61, 84, 99,
102, 107, 118, 118, 121, 134, 138, 138, 140, 143, 143, 145};
/*
@@ -351,7 +351,7 @@ XParseColor(
* p = pointer to current element being considered.
*/
int r = (spec[0] - 'A') & 0xdf;
- if (r > (sizeof(az)/sizeof(az[0] - 1))) {
+ if (r >= (int) sizeof(az) - 1) {
return 0;
}
size = az[r + 1] - az[r];