mirror of
https://github.com/SELinuxProject/selinux
synced 2025-02-20 03:26:53 +00:00
libsepol: silence false-positive -Wwrite-strings warning
When compiling with -Wwrite-strings, the compiler complains about calling strs_add with a const char* value for a char* parameter (DEFAULT_OBJECT is defined to "object_r"). Silence this warning by casting the literal string to char*. Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
This commit is contained in:
parent
232ff757d4
commit
1dc95dd558
@ -2369,7 +2369,7 @@ static int write_user_decl_rules_to_cil(FILE *out, struct policydb *pdb)
|
||||
goto exit;
|
||||
}
|
||||
|
||||
rc = strs_add(role_strs, DEFAULT_OBJECT);
|
||||
rc = strs_add(role_strs, (char *)DEFAULT_OBJECT);
|
||||
if (rc != 0) {
|
||||
strs_destroy(&role_strs);
|
||||
goto exit;
|
||||
|
Loading…
Reference in New Issue
Block a user