[PATCH 0/4] fix build warnings on gcc-16 and glibc-2.43

Arka Mondal <[email protected]>
Newsgroups org.kernel.vger.smatch
Message-ID <[email protected]>
Smatch builds with 14 warnings on gcc-16 and glibc-2.43.  This fixes 12.
Only the last patch changes behavior: it returns instead of storing a
truncated name.

Six of these are new. glibc-2.43 returns const from strchr() and strstr()
on const strings, and gcc-15 defaults to -std=gnu23 which enables it.

Two are left.  assume_indexes_are_valid() is unused because its add_hook()
call is commented out.

The other is in smatch_kernel_user_data.c:

      if (param_data_treat_untagged(value) || sym->ctype.as == 5)

ctype.as is a struct ident pointer, so this is never true.  It has never
worked: ctype.as became an ident in 69fce9f7 (Dec 2018), this code in 5f2fcd8a (Oct
2019).  Revive the check or delete the condition?

Arka Mondal (4):
  smatch: use const pointers for strchr() and strstr() results
  smatch: delete unused variables
  untracked_param: fix a -Wwrite-strings warning
  comparison: silence a -Wformat-truncation warning

 check_implicit_dependencies.c |  6 +++---
 check_unwind.c                |  2 +-
 smatch_comparison.c           |  6 ++++--
 smatch_db.c                   |  2 +-
 smatch_fn_arg_link.c          |  3 ---
 smatch_function_hooks.c       | 17 +++++++++--------
 smatch_kernel.c               |  2 +-
 smatch_math.c                 |  2 --
 smatch_param_key.c            |  2 +-
 smatch_untracked_param.c      |  2 +-
 10 files changed, 21 insertions(+), 23 deletions(-)

-- 
2.55.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.