From: Andy Shevchenko Date: Fri, 21 Mar 2025 14:40:48 +0000 (+0200) Subject: seq_file: Mark binary printing functions with __printf() attribute X-Git-Tag: v6.15-rc1~61^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6b2c1e30ad6846624d935a7ea98dae60458126b8;p=thirdparty%2Flinux.git seq_file: Mark binary printing functions with __printf() attribute Binary printing functions are using printf() type of format, and compiler is not happy about them as is: fs/seq_file.c:418:35: error: function ‘seq_bprintf’ might be a candidate for ‘gnu_printf’ format attribute [-Werror=suggest-attribute=format] Fix the compilation errors by adding __printf() attribute. Signed-off-by: Andy Shevchenko Reviewed-by: Kees Cook Reviewed-by: Petr Mladek Link: https://lore.kernel.org/r/20250321144822.324050-3-andriy.shevchenko@linux.intel.com Signed-off-by: Petr Mladek --- diff --git a/include/linux/seq_file.h b/include/linux/seq_file.h index 2fb266ea69fa4..d6ebf0596510c 100644 --- a/include/linux/seq_file.h +++ b/include/linux/seq_file.h @@ -181,6 +181,7 @@ int seq_open_private(struct file *, const struct seq_operations *, int); int seq_release_private(struct inode *, struct file *); #ifdef CONFIG_BINARY_PRINTF +__printf(2, 0) void seq_bprintf(struct seq_file *m, const char *f, const u32 *binary); #endif