From 9d7c40defdb384f10643a37f4b43f7605f905194 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Fri, 30 May 2025 11:52:27 +0100 Subject: [PATCH] libkmod: silence unused param warnings for kmod_file_load_*() stubs When building without compression, the respective load functions are static inline header stubs. In which case the struct kmod_file *file is always unused and the compiler rightfully warns about it. Not much we can do here, other than annotate them to silence the warnings. Signed-off-by: Emil Velikov Link: https://github.com/kmod-project/kmod/pull/361 Signed-off-by: Lucas De Marchi --- libkmod/libkmod-internal-file.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libkmod/libkmod-internal-file.h b/libkmod/libkmod-internal-file.h index a50d06e8..87588887 100644 --- a/libkmod/libkmod-internal-file.h +++ b/libkmod/libkmod-internal-file.h @@ -23,7 +23,7 @@ struct kmod_file { #if ENABLE_XZ int kmod_file_load_xz(struct kmod_file *file); #else -static inline int kmod_file_load_xz(struct kmod_file *file) +static inline int kmod_file_load_xz(_maybe_unused_ struct kmod_file *file) { return -ENOSYS; } @@ -32,7 +32,7 @@ static inline int kmod_file_load_xz(struct kmod_file *file) #if ENABLE_ZLIB int kmod_file_load_zlib(struct kmod_file *file); #else -static inline int kmod_file_load_zlib(struct kmod_file *file) +static inline int kmod_file_load_zlib(_maybe_unused_ struct kmod_file *file) { return -ENOSYS; } @@ -41,7 +41,7 @@ static inline int kmod_file_load_zlib(struct kmod_file *file) #if ENABLE_ZSTD int kmod_file_load_zstd(struct kmod_file *file); #else -static inline int kmod_file_load_zstd(struct kmod_file *file) +static inline int kmod_file_load_zstd(_maybe_unused_ struct kmod_file *file) { return -ENOSYS; } -- 2.47.3