diff options
author | Yauheni Kaliuta <yauheni.kaliuta@redhat.com> | 2020-11-29 18:47:37 +0200 |
---|---|---|
committer | Lucas De Marchi <lucas.demarchi@intel.com> | 2020-12-01 00:44:17 -0800 |
commit | 95ed3e75365b4922f4d5f3e024a26fe230f3a315 (patch) | |
tree | 816b3e41d72c927b495164c429c1a04961bf7e87 | |
parent | bd96d05256db2ff9a89dbe2e8bb6e26fcb800052 (diff) | |
download | kmod-95ed3e75365b4922f4d5f3e024a26fe230f3a315.tar.gz kmod-95ed3e75365b4922f4d5f3e024a26fe230f3a315.tar.bz2 kmod-95ed3e75365b4922f4d5f3e024a26fe230f3a315.zip |
libkmod: kmod_log_null: qualify ctx argument as const
kmod_log_null() does not change ctx (does nothing).
Fix warnings
In file included from libkmod/libkmod-index.c:33:
libkmod/libkmod-index.c: In function ‘index_mm_open’:
libkmod/libkmod-index.c:757:6: warning: passing argument 1 of ‘kmod_log_null’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
757 | DBG(ctx, "file=%s\n", filename);
Signed-off-by: Yauheni Kaliuta <yauheni.kaliuta@redhat.com>
-rw-r--r-- | libkmod/libkmod-internal.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libkmod/libkmod-internal.h b/libkmod/libkmod-internal.h index b22ac2a..398af9c 100644 --- a/libkmod/libkmod-internal.h +++ b/libkmod/libkmod-internal.h @@ -11,7 +11,7 @@ #include "libkmod.h" static _always_inline_ _printf_format_(2, 3) void - kmod_log_null(struct kmod_ctx *ctx, const char *format, ...) {} + kmod_log_null(const struct kmod_ctx *ctx, const char *format, ...) {} #define kmod_log_cond(ctx, prio, arg...) \ do { \ |