OSSP CVS Repository

ossp - Check-in [805]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 805
Date: 2001-Aug-30 15:57:21 (local)
2001-Aug-30 13:57:21 (UTC)
User:thl
Branch:
Comment: get rid of warnings by properly casting char to int for isdigit()
Tickets:
Inspections:
Files:
ossp-pkg/lmtp2nntp/lmtp.c      1.19 -> 1.20     6 inserted, 6 deleted
ossp-pkg/lmtp2nntp/msg.c      1.14 -> 1.15     4 inserted, 3 deleted
ossp-pkg/lmtp2nntp/sa.c      1.6 -> 1.7     1 inserted, 1 deleted

ossp-pkg/lmtp2nntp/lmtp.c 1.19 -> 1.20

--- lmtp.c       2001/08/30 13:38:04     1.19
+++ lmtp.c       2001/08/30 13:57:21     1.20
@@ -320,18 +320,18 @@
     char formatbuf[LMTP_LINE_MAXLEN];
 
     if (   strlen(res->statuscode) != 3
-        || !isdigit(res->statuscode[0])
-        || !isdigit(res->statuscode[1])
-        || !isdigit(res->statuscode[2]))
+        || !isdigit((int)res->statuscode[0])
+        || !isdigit((int)res->statuscode[1])
+        || !isdigit((int)res->statuscode[2]))
         return LMTP_ERR_ARG;
 
     if (res->dsncode != NULL) {
         if (   (strlen(res->dsncode) != 5)
-            || !isdigit(res->dsncode[0])
+            || !isdigit((int)res->dsncode[0])
             || (res->dsncode[1] != '.')
-            || !isdigit(res->dsncode[2])
+            || !isdigit((int)res->dsncode[2])
             || (res->dsncode[3] != '.')
-            || !isdigit(res->dsncode[4])
+            || !isdigit((int)res->dsncode[4])
             || (res->dsncode[0] != res->statuscode[0]))
             return LMTP_ERR_ARG;
     }


ossp-pkg/lmtp2nntp/msg.c 1.14 -> 1.15

--- msg.c        2001/08/28 14:24:03     1.14
+++ msg.c        2001/08/30 13:57:21     1.15
@@ -266,13 +266,14 @@
             for (o = 0; (cpRem[o] != ':') && (cpRem[o] != NUL); o++); /* offset name so at least one char of value remains in first line */
             o += 2; /* skip ": " */
             while ((strlen(cpRem) + (cpWrap == NULL ? 0 : strlen(WRAPUSING))) > WRAPAT) {
-                for (i = WRAPAT - 1 - (cpWrap == NULL ? 0 : strlen(WRAPUSING)); (i >= o) && !isspace(cpRem[i]); i--);
+                for (i = WRAPAT - 1 - (cpWrap == NULL ? 0 :
+                    strlen(WRAPUSING)); (i >= o) && !isspace((int)cpRem[i]); i--);
                 if (i < o)
                     i = WRAPAT - 1 - (cpWrap == NULL ? 0 : strlen(WRAPUSING) - 1); /* sorry, forced cut at non-blank */
                 cpCut = cpRem;
                 cpRem += i;
-                for (; (isspace(*cpRem) && (*cpRem != NUL)); cpRem++); /* skip next lines leading blanks */
-                for (; (i >= o) && isspace(cpCut[i-1]); i--); /* chop off this lines trailing blanks */
+                for (; (isspace((int)*cpRem) && (*cpRem != NUL)); cpRem++); /* skip next lines leading blanks */
+                for (; (i >= o) && isspace((int)cpCut[i-1]); i--); /* chop off this lines trailing blanks */
                 if (i >= o) { /* only keep line fragment if some non-blanks inside */
                     if (cpWrap == NULL) {
                         if ((cpWrap = (char *)malloc(i+strlen(WRAPUSING)+1)) == NULL)


ossp-pkg/lmtp2nntp/sa.c 1.6 -> 1.7

--- sa.c 2001/08/28 11:31:22     1.6
+++ sa.c 2001/08/30 13:57:21     1.7
@@ -138,7 +138,7 @@
         /* resolve port */
         bNumeric = 1;
         for (i = 0; cpPort[i] != NUL; i++) {
-            if (!isdigit(cpPort[i])) {
+            if (!isdigit((int)cpPort[i])) {
                 bNumeric = 0;
                 break;
             }

CVSTrac 2.0.1