mirror of
https://github.com/osmarks/ngircd.git
synced 2025-04-28 21:53:11 +00:00
Add a few casts, fix compiler warnings on NetBSD 5
This fixes a few warnings of this type: XXX.c: In function 'AAA': XXX.c:YY: warning: array subscription has type 'char' Tested on NetBSD 5.0.2 with gcc 4.1.3.
This commit is contained in:
parent
d11a700589
commit
44926b7f9f
@ -443,7 +443,7 @@ IRC_USER(CLIENT * Client, REQUEST * Req)
|
|||||||
punctuation is allowed.*/
|
punctuation is allowed.*/
|
||||||
ptr = Req->argv[0];
|
ptr = Req->argv[0];
|
||||||
while (*ptr) {
|
while (*ptr) {
|
||||||
if (!isalnum(*ptr) &&
|
if (!isalnum((int)*ptr) &&
|
||||||
*ptr != '+' && *ptr != '-' &&
|
*ptr != '+' && *ptr != '-' &&
|
||||||
*ptr != '.' && *ptr != '_') {
|
*ptr != '.' && *ptr != '_') {
|
||||||
Conn_Close(Client_Conn(Client), NULL,
|
Conn_Close(Client_Conn(Client), NULL,
|
||||||
|
@ -84,7 +84,7 @@ ngt_UpperStr(char *String)
|
|||||||
|
|
||||||
ptr = String;
|
ptr = String;
|
||||||
while(*ptr) {
|
while(*ptr) {
|
||||||
*ptr = toupper(*ptr);
|
*ptr = toupper((int)*ptr);
|
||||||
ptr++;
|
ptr++;
|
||||||
}
|
}
|
||||||
return String;
|
return String;
|
||||||
@ -103,7 +103,7 @@ ngt_LowerStr(char *String)
|
|||||||
|
|
||||||
ptr = String;
|
ptr = String;
|
||||||
while(*ptr) {
|
while(*ptr) {
|
||||||
*ptr = tolower(*ptr);
|
*ptr = tolower((int)*ptr);
|
||||||
ptr++;
|
ptr++;
|
||||||
}
|
}
|
||||||
return String;
|
return String;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user