From 249b233a4f1a63090bcbd213cab2f8bab4d63aa0 Mon Sep 17 00:00:00 2001 From: Nicola Sella Date: Wed, 6 Dec 2023 15:47:36 +0100 Subject: [PATCH] Fix Clang compilation error fixes the error: dnf5/include/libdnf5-cli/output/provides.hpp:34:13: error: 'static' function 'add_line_into_provides_tab le' declared in header file should be declared 'static inline' [-Werror,-Wunneeded-internal-declaration] 34 | static void add_line_into_provides_table(struct libscols_table * table, const char * key, const char * value) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ --- include/libdnf5-cli/output/provides.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/libdnf5-cli/output/provides.hpp b/include/libdnf5-cli/output/provides.hpp index c900f0f63..e5bd18920 100644 --- a/include/libdnf5-cli/output/provides.hpp +++ b/include/libdnf5-cli/output/provides.hpp @@ -31,7 +31,7 @@ namespace libdnf5::cli::output { enum ProvidesMatchedBy : int { NO_MATCH = 0, PROVIDES = 1, FILENAME = 2, BINARY = 3 }; -static void add_line_into_provides_table(struct libscols_table * table, const char * key, const char * value) { +static inline void add_line_into_provides_table(struct libscols_table * table, const char * key, const char * value) { struct libscols_line * ln = scols_table_new_line(table, nullptr); scols_line_set_data(ln, 0, key); scols_line_set_data(ln, 1, value);