]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
Fix compiler warnings on NetBSD
authorMiroslav Lichvar <mlichvar@redhat.com>
Tue, 9 Sep 2014 09:48:09 +0000 (11:48 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Tue, 9 Sep 2014 09:48:09 +0000 (11:48 +0200)
cmdparse.c
getdate.c
getdate.y
logging.h
sys_netbsd.c

index 437dfbd8332a7e4ae5a9322c5620018d276d9a7e..a6f1efa12e01c8fd9c62bb30b648349e46eb4878 100644 (file)
@@ -204,7 +204,7 @@ CPS_NormalizeLine(char *line)
 
   /* Remove white-space at beginning and replace white-spaces with space char */
   for (p = q = line; *p; p++) {
-    if (isspace(*p)) {
+    if (isspace((unsigned char)*p)) {
       if (!space)
         *q++ = ' ';
       space = 1;
@@ -234,15 +234,15 @@ CPS_SplitWord(char *line)
   char *p = line, *q = line;
 
   /* Skip white-space before the word */
-  while (*q && isspace(*q))
+  while (*q && isspace((unsigned char)*q))
     q++;
 
   /* Move the word to the beginning */
-  while (*q && !isspace(*q))
+  while (*q && !isspace((unsigned char)*q))
     *p++ = *q++;
 
   /* Find the next word */
-  while (*q && isspace(*q))
+  while (*q && isspace((unsigned char)*q))
     q++;
 
   *p = '\0';
index 17c960abde4622fdcfcb3f150ecceafa34a41a47..48a3b12273d4fdc7e0f739152dfeee48ae21bb24 100644 (file)
--- a/getdate.c
+++ b/getdate.c
@@ -2532,7 +2532,7 @@ LookupWord (buff)
   /* Make it lowercase. */
   for (p = buff; *p; p++)
     if (ISUPPER ((unsigned char) *p))
-      *p = tolower (*p);
+      *p = tolower ((unsigned char) *p);
 
   if (strcmp (buff, "am") == 0 || strcmp (buff, "a.m.") == 0)
     {
index 5318957f74762029fbdb68fcbad2c659a159d2a9..99de9b0eecbc0252c86b3cc3142ba9e518d2953d 100644 (file)
--- a/getdate.y
+++ b/getdate.y
@@ -711,7 +711,7 @@ LookupWord (buff)
   /* Make it lowercase. */
   for (p = buff; *p; p++)
     if (ISUPPER ((unsigned char) *p))
-      *p = tolower (*p);
+      *p = tolower ((unsigned char) *p);
 
   if (strcmp (buff, "am") == 0 || strcmp (buff, "a.m.") == 0)
     {
index 898cde9faff5db874a0df6150e68e4f1b0f7c217..1b8236da60745bff1e6dafd34e90bb17213e1904 100644 (file)
--- a/logging.h
+++ b/logging.h
@@ -29,6 +29,8 @@
 #ifndef GOT_LOGGING_H
 #define GOT_LOGGING_H
 
+#include "sysincl.h"
+
 /* Flag indicating whether debug messages are logged */
 extern int log_debug_enabled;
 
index c9a29b33ea7f037ef07597228e6fe3182bd14264..8c08d4ee8a8ec4693f56740759bfdf8f369ef1d4 100644 (file)
@@ -281,7 +281,6 @@ SYS_NetBSD_Initialise(void)
   };
 
   kvm_t *kt;
-  FILE *fp;
 
   kt = kvm_open(NULL, NULL, NULL, O_RDONLY, NULL);
   if (!kt) {