INN commit: trunk (frontends/inews.c innd/art.c nnrpd/post.c)
INN Commit
rra at isc.org
Wed Jul 31 17:14:37 UTC 2013
Date: Wednesday, July 31, 2013 @ 10:14:37
Author: iulius
Revision: 9518
fix three casts to unsigned char when using toupper()
GCC complains because of char-subscripts warnings.
Modified:
trunk/frontends/inews.c
trunk/innd/art.c
trunk/nnrpd/post.c
-------------------+
frontends/inews.c | 2 +-
innd/art.c | 2 +-
nnrpd/post.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
Modified: frontends/inews.c
===================================================================
--- frontends/inews.c 2013-07-31 17:12:56 UTC (rev 9517)
+++ frontends/inews.c 2013-07-31 17:14:37 UTC (rev 9518)
@@ -459,7 +459,7 @@
strncpy(out, pwp->pw_name, left);
if (islower((unsigned char) *out)
&& (out == outbuff || !isalpha((unsigned char) out[-1])))
- *out = toupper(*out);
+ *out = toupper((unsigned char) *out);
while (*out) {
out++;
left--;
Modified: innd/art.c
===================================================================
--- innd/art.c 2013-07-31 17:12:56 UTC (rev 9517)
+++ innd/art.c 2013-07-31 17:14:37 UTC (rev 9518)
@@ -649,7 +649,7 @@
}
/* See if this is a system header. A fairly tightly-coded binary search. */
- c = islower((unsigned char) *header) ? toupper(*header) : *header;
+ c = islower((unsigned char) *header) ? toupper((unsigned char) *header) : *header;
for (*colon = '\0', tp = ARTheadertree; tp; ) {
if ((i = c - tp->Name[0]) == 0 && (i = strcasecmp(header, tp->Name)) == 0)
break;
Modified: nnrpd/post.c
===================================================================
--- nnrpd/post.c 2013-07-31 17:12:56 UTC (rev 9517)
+++ nnrpd/post.c 2013-07-31 17:14:37 UTC (rev 9518)
@@ -208,7 +208,7 @@
for (p = article; ; ) {
/* See if it's a known header. */
- c = islower((unsigned char) *p) ? toupper(*p) : *p;
+ c = islower((unsigned char) *p) ? toupper((unsigned char) *p) : *p;
for (hp = Table; hp < ARRAY_END(Table); hp++) {
if (c == hp->Name[0]
&& p[hp->Size] == ':'
More information about the inn-committers
mailing list