libsepol/cil: fix -Wwrite-strings warning
cil_defaults_to_policy() defines its third argument as non-const "char *kind" even though it is called with literal strings. This makes gcc report the following warning when compiling with -Wwrite-strings: ../cil/src/cil_policy.c: In function ‘cil_gen_policy’: ../cil/src/cil_policy.c:1931:60: error: passing argument 3 of ‘cil_defaults_to_policy’ discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] cil_defaults_to_policy(out, lists[CIL_LIST_DEFAULT_USER], "default_user"); ^~~~~~~~~~~~~~ Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
This commit is contained in:
parent
3ab3a218f2
commit
12f3ef8280
1 changed files with 1 additions and 1 deletions
|
@ -775,7 +775,7 @@ static void cil_classes_to_policy(FILE *out, struct cil_list *classorder)
|
|||
}
|
||||
}
|
||||
|
||||
static void cil_defaults_to_policy(FILE *out, struct cil_list *defaults, char *kind)
|
||||
static void cil_defaults_to_policy(FILE *out, struct cil_list *defaults, const char *kind)
|
||||
{
|
||||
struct cil_list_item *i1, *i2, *i3;
|
||||
struct cil_default *def;
|
||||
|
|
Loading…
Reference in a new issue