]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[master] address compiler warnings
authorEvan Hunt <each@isc.org>
Wed, 15 Jan 2014 17:35:44 +0000 (09:35 -0800)
committerEvan Hunt <each@isc.org>
Wed, 15 Jan 2014 17:35:44 +0000 (09:35 -0800)
lib/isc/tm.c

index c14d36d656d4006cbdcb0a542211e90453f1b17f..9f19f0727c8d17e2fdad8677aea4fa30c65746d0 100644 (file)
@@ -58,6 +58,7 @@
 #include <ctype.h>
 
 #include <isc/tm.h>
+#include <isc/util.h>
 
 /*
  * Portable conversion routines for struct tm, replacing
@@ -148,7 +149,7 @@ isc_tm_timegm(struct tm *tm) {
 
 char *
 isc_tm_strptime(const char *buf, const char *fmt, struct tm *tm) {
-       char c;
+       char c, *ret;
        const char *bp;
        size_t len = 0;
        int alt_format, i, split_year = 0;
@@ -160,8 +161,8 @@ isc_tm_strptime(const char *buf, const char *fmt, struct tm *tm) {
                alt_format = 0;
 
                /* Eat up white-space. */
-               if (isspace(c)) {
-                       while (isspace(*bp))
+               if (isspace((int) c)) {
+                       while (isspace((int) *bp))
                                bp++;
 
                        fmt++;
@@ -426,7 +427,7 @@ literal:
                case 'n':       /* Any kind of white-space. */
                case 't':
                        LEGAL_ALT(0);
-                       while (isspace(*bp))
+                       while (isspace((int) *bp))
                                bp++;
                        break;
 
@@ -439,5 +440,6 @@ literal:
        }
 
        /* LINTED functional specification */
-       return ((char *)bp);
+       DE_CONST(bp, ret);
+       return (ret);
 }