summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2015-03-09 21:30:27 +0000
committerschwarze <schwarze@openbsd.org>2015-03-09 21:30:27 +0000
commit1918841e2ed981874e2c1fa688e53ca1a993edab (patch)
tree4e10dc98b3b63a1649fd0628820160c7c81bd309
parentIf my calculations are correct, when this baby hits 5.8... you're gonna see (diff)
downloadwireguard-openbsd-1918841e2ed981874e2c1fa688e53ca1a993edab.tar.xz
wireguard-openbsd-1918841e2ed981874e2c1fa688e53ca1a993edab.zip
Explicitly cast when assigning from char * to unsigned char * and vice versa.
For example, gcc 4.7 wants this with -Wall. Patch from kristaps@.
-rw-r--r--usr.bin/mandoc/main.c6
-rw-r--r--usr.bin/mandoc/preconv.c4
2 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/mandoc/main.c b/usr.bin/mandoc/main.c
index 07eb4d650c9..d79e6cb8eb3 100644
--- a/usr.bin/mandoc/main.c
+++ b/usr.bin/mandoc/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.127 2015/02/27 16:00:54 schwarze Exp $ */
+/* $OpenBSD: main.c,v 1.128 2015/03/09 21:30:27 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2012, 2014, 2015 Ingo Schwarze <schwarze@openbsd.org>
@@ -293,11 +293,11 @@ main(int argc, char *argv[])
argc = 1;
}
} else if (argc > 1 &&
- ((uc = argv[0]) != NULL) &&
+ ((uc = (unsigned char *)argv[0]) != NULL) &&
((isdigit(uc[0]) && (uc[1] == '\0' ||
(isalpha(uc[1]) && uc[2] == '\0'))) ||
(uc[0] == 'n' && uc[1] == '\0'))) {
- search.sec = uc;
+ search.sec = (char *)uc;
argv++;
argc--;
}
diff --git a/usr.bin/mandoc/preconv.c b/usr.bin/mandoc/preconv.c
index 3d5a30655f6..532152eedad 100644
--- a/usr.bin/mandoc/preconv.c
+++ b/usr.bin/mandoc/preconv.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: preconv.c,v 1.5 2014/12/19 04:57:11 schwarze Exp $ */
+/* $OpenBSD: preconv.c,v 1.6 2015/03/09 21:30:27 schwarze Exp $ */
/*
* Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -31,7 +31,7 @@ preconv_encode(struct buf *ib, size_t *ii, struct buf *ob, size_t *oi,
int nby;
unsigned int accum;
- cu = ib->buf + *ii;
+ cu = (unsigned char *)ib->buf + *ii;
assert(*cu & 0x80);
if ( ! (*filenc & MPARSE_UTF8))