First few files of signedness cleanup for GCC 4.0.

This commit is contained in:
Ragnvald Maartmann-Moe IV 2005-02-10 22:03:16 +00:00
parent 71678e1859
commit b59f366684
3 changed files with 5 additions and 7 deletions

View file

@ -100,23 +100,21 @@ Info_SetValueForStarKey (info_t *info, const char *key, const char *value,
{ {
info_key_t *k; info_key_t *k;
int cursize; int cursize;
char *str; char *str, *d, *s;
byte *s, *d;
if (strstr (key, "\\") || strstr (value, "\\")) { if (strstr (key, "\\") || strstr (value, "\\")) {
Sys_Printf ("Can't use keys or values with a \\\n"); Sys_Printf ("Can't use keys or values with a \\\n");
return 0; return 0;
} }
if (strstr (key, "\"") || strstr (value, "\"")) { if (strstr (key, "\"") || strstr (value, "\"")) {
Sys_Printf ("Can't use keys or values with a \"\n"); Sys_Printf ("Can't use keys or values with a \"\n");
return 0; return 0;
} }
if (strlen (key) > 63 || strlen (value) > 63) { if (strlen (key) > 63 || strlen (value) > 63) {
Sys_Printf ("Keys and values must be < 64 characters.\n"); Sys_Printf ("Keys and values must be < 64 characters.\n");
return 0; return 0;
} }
k = Hash_Find (info->tab, key); k = Hash_Find (info->tab, key);
cursize = info->cursize; cursize = info->cursize;
if (k) { if (k) {

View file

@ -261,7 +261,7 @@ MSG_ReadString (qmsg_t *msg)
return ""; return "";
} }
string = &msg->message->data[msg->readcount]; string = (char *) &msg->message->data[msg->readcount];
maxlen = msg->message->cursize - msg->readcount; maxlen = msg->message->cursize - msg->readcount;
len = strnlen (string, maxlen); len = strnlen (string, maxlen);

View file

@ -59,7 +59,7 @@ init_quotables (void)
{ {
const char *unquotables = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" const char *unquotables = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
"abcdefghijklmnopqrstuvwxyz!#$%&*+-./:?@|~_^"; "abcdefghijklmnopqrstuvwxyz!#$%&*+-./:?@|~_^";
const byte *c; const char *c;
memset (quotable_bitmap, ~0, sizeof (quotable_bitmap)); memset (quotable_bitmap, ~0, sizeof (quotable_bitmap));
for (c = unquotables; *c; c++) for (c = unquotables; *c; c++)
quotable_bitmap[*c / 8] &= ~(1 << (*c % 8)); quotable_bitmap[*c / 8] &= ~(1 << (*c % 8));