aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/sctop.py
diff options
context:
space:
mode:
authorSimon Horman <[email protected]>2024-10-23 13:15:28 +0100
committerJakub Kicinski <[email protected]>2024-10-29 11:45:54 -0700
commit3f7f3ef44f4b735b577291afdf7a87e6ce4b415d (patch)
treeeca11e65fbf1f6280b83137b88b99272bfe97bf1 /tools/perf/scripts/python/sctop.py
parent9a1036389fa25cf90d58e3ae1bb0b1ad877ef1c8 (diff)
wwan: core: Pass string literal as format argument of dev_set_name()
Both gcc-14 and clang-18 report that passing a non-string literal as the format argument of dev_set_name() is potentially insecure. E.g. clang-18 says: drivers/net/wwan/wwan_core.c:442:34: warning: format string is not a string literal (potentially insecure) [-Wformat-security] 442 | return dev_set_name(&port->dev, buf); | ^~~ drivers/net/wwan/wwan_core.c:442:34: note: treat the string as an argument to avoid this 442 | return dev_set_name(&port->dev, buf); | ^ | "%s", It is always the case where the contents of mod is safe to pass as the format argument. That is, in my understanding, it never contains any format escape sequences. But, it seems better to be safe than sorry. And, as a bonus, compiler output becomes less verbose by addressing this issue as suggested by clang-18. Compile tested only. No functional change intended. Signed-off-by: Simon Horman <[email protected]> Acked-by: Sergey Ryazanov <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/sctop.py')
0 files changed, 0 insertions, 0 deletions