INN commit: branches/2.5 (frontends/inews.c innd/art.c nnrpd/post.c)
INN Commit
rra at isc.org
Wed Jul 31 17:27:33 UTC 2013
Date: Wednesday, July 31, 2013 @ 10:27:33
Author: iulius
Revision: 9521
fix three casts to unsigned char when using toupper()
GCC complains because of char-subscripts warnings.
Modified:
branches/2.5/frontends/inews.c
branches/2.5/innd/art.c
branches/2.5/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:25:38 UTC (rev 9520)
+++ frontends/inews.c 2013-07-31 17:27:33 UTC (rev 9521)
@@ -462,7 +462,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:25:38 UTC (rev 9520)
+++ innd/art.c 2013-07-31 17:27:33 UTC (rev 9521)
@@ -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:25:38 UTC (rev 9520)
+++ nnrpd/post.c 2013-07-31 17:27:33 UTC (rev 9521)
@@ -204,7 +204,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