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:
parent
c65205a6e2
commit
b9b670e347
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=229024
@ -82,7 +82,8 @@ fflagstostr(flags)
|
|||||||
u_long flags;
|
u_long flags;
|
||||||
{
|
{
|
||||||
char *string;
|
char *string;
|
||||||
char *sp, *dp;
|
const char *sp;
|
||||||
|
char *dp;
|
||||||
u_long setflags;
|
u_long setflags;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user