From: Arnd Bergmann Date: Wed, 23 Apr 2025 16:43:49 +0000 (+0200) Subject: ext4: avoid -Wformat-security warning X-Git-Tag: v6.16-rc1~139^2~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d612a07931e261c537978aad096e7340b687cd0c;p=thirdparty%2Fkernel%2Flinux.git ext4: avoid -Wformat-security warning check_igot_inode() prints a variable string, which causes a harmless warning with 'make W=1': fs/ext4/inode.c:4763:45: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security] 4763 | ext4_error_inode(inode, function, line, 0, err_str); Use a trivial "%s" format string instead. Signed-off-by: Arnd Bergmann Reviewed-by: Jan Kara Link: https://patch.msgid.link/20250423164354.2780635-1-arnd@kernel.org Signed-off-by: Theodore Ts'o --- diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 9b0bfbbdb50b9..7237b63267223 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -4809,7 +4809,7 @@ static int check_igot_inode(struct inode *inode, ext4_iget_flags flags, return 0; error: - ext4_error_inode(inode, function, line, 0, err_str); + ext4_error_inode(inode, function, line, 0, "%s", err_str); return -EFSCORRUPTED; }