hazohelet wrote:

> Is there some way we can narrow the scope of this patch so we don't lose 
> warnings for normal `snprintf`s, only for the kernel one? If we really can't 
> tell the difference from the source code, we could move the affected warnings 
> to a different warning group instead, so the kernel can turn them off.

Thanks for the feedback. I narrowed the scope by checking whether the next 
character of `%p` can be part of the kernel extended format specifier.
If people write `%pM` or a similar outside kernel, it still aborts the format 
size estimator and could lead to false negative. But I think it would hurt 
people much less because people usually put non-alphanumeric character after 
`%p`.

https://github.com/llvm/llvm-project/pull/65969
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to