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
This commit is contained in:
dim 2011-12-30 20:41:24 +00:00
parent d65386a32f
commit 320e3c42d9

View File

@ -82,7 +82,8 @@ fflagstostr(flags)
u_long flags;
{
char *string;
char *sp, *dp;
const char *sp;
char *dp;
u_long setflags;
int i;