diff options
| author | Christian Göttsche <[email protected]> | 2022-01-25 14:14:13 +0000 |
|---|---|---|
| committer | Paul Moore <[email protected]> | 2022-01-26 18:54:25 +0000 |
| commit | d3b1161f29cf479b86d4c3c6f200a8eb27254877 (patch) | |
| tree | b69cbafb88cfeb6930d78741743c303636647640 /security/selinux/netnode.c | |
| parent | selinux: declare path parameters of _genfs_sid const (diff) | |
| download | kernel-d3b1161f29cf479b86d4c3c6f200a8eb27254877.tar.gz kernel-d3b1161f29cf479b86d4c3c6f200a8eb27254877.zip | |
selinux: declare name parameter of hash_eval const
String literals are passed as second argument to hash_eval(). Also the
parameter is already declared const in the DEBUG_HASHES configuration.
Reported by clang [-Wwrite-strings]:
security/selinux/ss/policydb.c:1881:26: error: passing
'const char [8]' to parameter of type 'char *' discards
qualifiers
hash_eval(&p->range_tr, rangetr);
^~~~~~~~~
security/selinux/ss/policydb.c:707:55: note: passing argument to
parameter 'hash_name' here
static inline void hash_eval(struct hashtab *h, char *hash_name)
^
security/selinux/ss/policydb.c:2099:32: error: passing
'const char [11]' to parameter of type 'char *' discards
qualifiers
hash_eval(&p->filename_trans, filenametr);
^~~~~~~~~~~~
security/selinux/ss/policydb.c:707:55: note: passing argument to
parameter 'hash_name' here
static inline void hash_eval(struct hashtab *h, char *hash_name)
^
Signed-off-by: Christian Göttsche <[email protected]>
[PM: line wrapping in description]
Signed-off-by: Paul Moore <[email protected]>
Diffstat (limited to 'security/selinux/netnode.c')
0 files changed, 0 insertions, 0 deletions
