Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Silence clang error -Wunneeded-internal-declaration #1130

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,16 @@ if(NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wl,--as-needed)
endif()

if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
# TODO remove this block once the output header files are reworked
# This block silence this error
# dnf5/include/libdnf5-cli/output/provides.hpp:34:13: error: 'static' function 'add_line_into_provide
# s_table' 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) {
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
add_compile_options(-Wno-unneeded-internal-declaration)
endif()

add_definitions(-DPROJECT_BINARY_DIR="${PROJECT_BINARY_DIR}")
add_definitions(-DPROJECT_SOURCE_DIR="${PROJECT_SOURCE_DIR}")

Expand Down
Loading