Thread (4 messages) 4 messages, 2 authors, 2025-01-05

Re: [PATCH 1/2] lsm: constify function parameters

From: Paul Moore <paul@paul-moore.com>
Date: 2025-01-05 03:04:38
Also in: lkml, llvm

On Nov 25, 2024 =?UTF-8?q?Christian=20G=C3=B6ttsche?= [off-list ref] wrote:
The functions print_ipv4_addr() and print_ipv6_addr() are called with
string literals and do not modify these parameters internally.

Reported by clang:

    security/lsm_audit.c:324:7: warning: passing 'const char[6]' to parameter of type 'char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
      324 |                                                 "laddr", "lport");
          |                                                 ^~~~~~~
    security/lsm_audit.c:183:27: note: passing argument to parameter 'name1' here
      183 |                                    __be16 port, char *name1, char *name2)
          |                                                       ^

Signed-off-by: Christian Göttsche <redacted>
---
 security/lsm_audit.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Merged into lsm/dev, thanks.

--
paul-moore.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help