Re: Fwd: [PATCH] fix format security

Bruno Haible via Gnulib discussion list <[email protected]>
Newsgroups gmane.comp.lib.gnulib.bugs,gmane.editors.poke.devel
Message-ID <5285261.VQJxnDRnGh@cagnes>
Paul Eggert wrote:
> > It is a bit unfortunate that this warning comes up almost monthly
> 
> Perhaps we should add something like the following to gnulib/lib/gettext.h, once we have a Clang bug report number? Although drastic, this would save us time and we'd still get static checking when compiling with GCC, except for printf calls in clang-only code (which should be rare).
> 
> /* Pacify clang false alarm
>     <https://github.com/llvm/llvm-project/issues/987654321>.  */
> #ifdef __clang__
> # pragma clang diagnostic ignored "-Wformat-security"
> #endif

Nice idea. But I still [1] think that it is too drastic. Some people
might be really upset.

Bruno

[1] https://lists.gnu.org/archive/html/bug-gnulib/2026-01/msg00090.html
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.