summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2011-12-30 20:41:24 +0000
committerdim <dim@FreeBSD.org>2011-12-30 20:41:24 +0000
commit320e3c42d97756708b2d723c0577368cac0ccb70 (patch)
tree4b824e784516e8dce6d5bd09b8ee75dd690db750 /lib
parentd65386a32fea92f57d713b7290622698243bbfa2 (diff)
downloadFreeBSD-src-320e3c42d97756708b2d723c0577368cac0ccb70.zip
FreeBSD-src-320e3c42d97756708b2d723c0577368cac0ccb70.tar.gz
Add some additional const poison after r228972. The 'mapping' array in
lib/libc/gen/strtofflags.c became const, but gcc did not warn about assigning its members to non-const pointers. Clang warned about this with: lib/libc/gen/strtofflags.c:98:12: error: assigning to 'char *' from 'const char *' discards qualifiers [-Werror,-Wincompatible-pointer-types] for (sp = mapping[i].invert ? mapping[i].name : ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Reviewed by: jilles
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/gen/strtofflags.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libc/gen/strtofflags.c b/lib/libc/gen/strtofflags.c
index 596ef7b..1edaa5a 100644
--- a/lib/libc/gen/strtofflags.c
+++ b/lib/libc/gen/strtofflags.c
@@ -82,7 +82,8 @@ fflagstostr(flags)
u_long flags;
{
char *string;
- char *sp, *dp;
+ const char *sp;
+ char *dp;
u_long setflags;
int i;
OpenPOWER on IntegriCloud