summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoerg <joerg@NetBSD.org>2014-11-04 23:00:35 +0000
committerjoerg <joerg@NetBSD.org>2014-11-04 23:00:35 +0000
commit64a07b54bc9511f2cfd4de9d8a2bbffa841a1acc (patch)
treeb1d574a048cb6dd805f486a074586989043ff025
parent38e3368398faf1892c2d096c76a9ae4b92cf4c3f (diff)
To make -Wconversion happy, cast return value of tolower/toupper to
char.
-rw-r--r--usr.bin/config/main.c6
-rw-r--r--usr.bin/config/mkheaders.c10
-rw-r--r--usr.bin/config/sem.c6
3 files changed, 11 insertions, 11 deletions
diff --git a/usr.bin/config/main.c b/usr.bin/config/main.c
index 9f65df1bc22..0ad097ee248 100644
--- a/usr.bin/config/main.c
+++ b/usr.bin/config/main.c
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.71 2014/10/31 07:38:36 uebayasi Exp $ */
+/* $NetBSD: main.c,v 1.72 2014/11/04 23:00:35 joerg Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -45,7 +45,7 @@
#endif
#include <sys/cdefs.h>
-__RCSID("$NetBSD: main.c,v 1.71 2014/10/31 07:38:36 uebayasi Exp $");
+__RCSID("$NetBSD: main.c,v 1.72 2014/11/04 23:00:35 joerg Exp $");
#ifndef MAKE_BOOTSTRAP
#include <sys/cdefs.h>
@@ -1556,7 +1556,7 @@ strtolower(const char *name)
char c;
for (n = name, p = low; (c = *n) != '\0'; n++)
- *p++ = isupper((u_char)c) ? tolower((u_char)c) : c;
+ *p++ = isupper((u_char)c) ? (char)tolower((u_char)c) : c;
*p = 0;
return (intern(low));
}
diff --git a/usr.bin/config/mkheaders.c b/usr.bin/config/mkheaders.c
index 0559ea3a5bf..2dfd14d9698 100644
--- a/usr.bin/config/mkheaders.c
+++ b/usr.bin/config/mkheaders.c
@@ -1,4 +1,4 @@
-/* $NetBSD: mkheaders.c,v 1.24 2014/10/30 15:13:11 christos Exp $ */
+/* $NetBSD: mkheaders.c,v 1.25 2014/11/04 23:00:35 joerg Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -45,7 +45,7 @@
#endif
#include <sys/cdefs.h>
-__RCSID("$NetBSD: mkheaders.c,v 1.24 2014/10/30 15:13:11 christos Exp $");
+__RCSID("$NetBSD: mkheaders.c,v 1.25 2014/11/04 23:00:35 joerg Exp $");
#include <sys/param.h>
#include <ctype.h>
@@ -323,7 +323,7 @@ locators_print(const char *name, void *value, void *arg)
locdup = estrdup(name);
for (cp = locdup; *cp; cp++)
if (islower((unsigned char)*cp))
- *cp = toupper((unsigned char)*cp);
+ *cp = (char)toupper((unsigned char)*cp);
for (i = 0, ll = a->a_locs; ll; ll = ll->ll_next, i++) {
if (strchr(ll->ll_name, ' ') != NULL ||
strchr(ll->ll_name, '\t') != NULL)
@@ -335,7 +335,7 @@ locators_print(const char *name, void *value, void *arg)
namedup = estrdup(ll->ll_name);
for (cp = namedup; *cp; cp++)
if (islower((unsigned char)*cp))
- *cp = toupper((unsigned char)*cp);
+ *cp = (char)toupper((unsigned char)*cp);
else if (*cp == ARRCHR)
*cp = '_';
fprintf(fp, "#define %sCF_%s %d\n", locdup, namedup, i);
@@ -533,7 +533,7 @@ cntname(const char *src)
dst = buf;
*dst++ = 'N';
while ((c = *src++) != 0)
- *dst++ = islower((u_char)c) ? toupper((u_char)c) : c;
+ *dst++ = islower((u_char)c) ? (char)toupper((u_char)c) : c;
*dst = 0;
return (buf);
}
diff --git a/usr.bin/config/sem.c b/usr.bin/config/sem.c
index 25cddceabc4..7c26ddbd4c9 100644
--- a/usr.bin/config/sem.c
+++ b/usr.bin/config/sem.c
@@ -1,4 +1,4 @@
-/* $NetBSD: sem.c,v 1.67 2014/11/01 04:34:27 uebayasi Exp $ */
+/* $NetBSD: sem.c,v 1.68 2014/11/04 23:00:35 joerg Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -45,7 +45,7 @@
#endif
#include <sys/cdefs.h>
-__RCSID("$NetBSD: sem.c,v 1.67 2014/11/01 04:34:27 uebayasi Exp $");
+__RCSID("$NetBSD: sem.c,v 1.68 2014/11/04 23:00:35 joerg Exp $");
#include <sys/param.h>
#include <ctype.h>
@@ -398,7 +398,7 @@ defdevclass(const char *name, struct loclist *locs, struct attrlist *deps,
"lower-case alphanumeric characters");
errored = 1;
}
- *cp = toupper((unsigned char)*cp);
+ *cp = (char)toupper((unsigned char)*cp);
}
a->a_devclass = intern(classenum);