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:
Dimitry Andric 2011-12-30 20:41:24 +00:00
parent c65205a6e2
commit b9b670e347

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;