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 <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/361
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
#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;
}
#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;
}
#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;
}