From b59f366684e8c250ee558cf5fa7c9cf02f6a6ed7 Mon Sep 17 00:00:00 2001 From: Ragnvald Maartmann-Moe IV Date: Thu, 10 Feb 2005 22:03:16 +0000 Subject: [PATCH] First few files of signedness cleanup for GCC 4.0. --- libs/util/info.c | 8 +++----- libs/util/msg.c | 2 +- libs/util/qfplist.c | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/libs/util/info.c b/libs/util/info.c index 976a0c116..f619a1a81 100644 --- a/libs/util/info.c +++ b/libs/util/info.c @@ -100,23 +100,21 @@ Info_SetValueForStarKey (info_t *info, const char *key, const char *value, { info_key_t *k; int cursize; - char *str; - byte *s, *d; + char *str, *d, *s; if (strstr (key, "\\") || strstr (value, "\\")) { Sys_Printf ("Can't use keys or values with a \\\n"); return 0; } - if (strstr (key, "\"") || strstr (value, "\"")) { Sys_Printf ("Can't use keys or values with a \"\n"); return 0; } - if (strlen (key) > 63 || strlen (value) > 63) { Sys_Printf ("Keys and values must be < 64 characters.\n"); return 0; } + k = Hash_Find (info->tab, key); cursize = info->cursize; if (k) { @@ -132,7 +130,7 @@ Info_SetValueForStarKey (info_t *info, const char *key, const char *value, if (strequal (k->value, value)) return 0; info->cursize -= strlen (k->value) + 1; - free ((char*)k->value); + free ((char *) k->value); } else { if (!(k = malloc (sizeof (info_key_t)))) Sys_Error ("Info_SetValueForStarKey: out of memory"); diff --git a/libs/util/msg.c b/libs/util/msg.c index 2c2d4889b..0fedc961a 100644 --- a/libs/util/msg.c +++ b/libs/util/msg.c @@ -261,7 +261,7 @@ MSG_ReadString (qmsg_t *msg) return ""; } - string = &msg->message->data[msg->readcount]; + string = (char *) &msg->message->data[msg->readcount]; maxlen = msg->message->cursize - msg->readcount; len = strnlen (string, maxlen); diff --git a/libs/util/qfplist.c b/libs/util/qfplist.c index 34da7248a..5bc7603c3 100644 --- a/libs/util/qfplist.c +++ b/libs/util/qfplist.c @@ -59,7 +59,7 @@ init_quotables (void) { const char *unquotables = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" "abcdefghijklmnopqrstuvwxyz!#$%&*+-./:?@|~_^"; - const byte *c; + const char *c; memset (quotable_bitmap, ~0, sizeof (quotable_bitmap)); for (c = unquotables; *c; c++) quotable_bitmap[*c / 8] &= ~(1 << (*c % 8));