RedSpah / xxhash_cpp

Port of the xxhash library to C++17.
BSD 2-Clause "Simplified" License
165 stars 34 forks source link

Make warning free build #7

Closed Flamefire closed 4 years ago

Flamefire commented 5 years ago

Compiling the current source throws a couple warnings (g++-6:

I suggest to build with -Werror on CI and take care of the warnings

RedSpah commented 5 years ago

The only warning originating from xxhash.hpp directly is -Wunused-parameter, and it originated from a way to work around C++14 lack of constexpr if. There does exist an [[maybe_unused]] paramenter, but sadly it itself is a C++17 feature. Unsure how to solve this issue. I can fix warnings in the test itself, but of course the header itself takes preference.

Flamefire commented 5 years ago

I can have a look at those warnings when I'm back on my Linux machine if you like and willing to add -Werror to CI.

RedSpah commented 4 years ago

With recent changes and cleanup I'm happy to report that the library now compiles without any warnings with -Wall -Wextra -Wpedantic, and clang-exclusive -Wmost.