Repository navigation
Fix -Wextra, -Wextra-semi, -Wsign-conversion, and -Wunused-parameter warnings in public headers - #803
Open
clockblocker wants to merge 1 commit into
Conversation
…warnings in public headers
This was referenced Nov 29, 2026
clockblocker
added a commit
to clockblocker/reflect-cpp
that referenced
this pull request
Dec 1, 2026
… -Wunused-parameter warnings Cleans compiler warnings across 14 public headers (+22/-18 LOC) using unnamed unused parameters (matching munich-data-engineering#582) with zero API or behavioral changes so consumers building with strict flags (`-Wall -Wextra -Werror -pedantic -Wconversion -Wsign-conversion -Wextra-semi`) get clean builds. Upstream PR: munich-data-engineering#803 Downstream receipts: - hudson-trading/slang-server suppresses reflect-cpp warnings in 4 places: https://github.com/hudson-trading/slang-server/blob/1b413a4655877a55b3f8a450c23e4ba6c2bf4267/CMakeLists.txt#L317-L321 - games-on-whales/wolf wraps FetchContent(reflect-cpp) with `add_compile_options(-w)`: https://github.com/games-on-whales/wolf/blob/ac2461f68feda41fdc7a7c8e812b9ab4b80520b7/src/moonlight-server/CMakeLists.txt#L38-L45 - munich-data-engineering/sqlgen, openmoq/moqx, and FANUC-CORPORATION/fanuc_driver all compile with `-Wall -Wextra -Wpedantic`.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Including public
reflect-cppheaders under strict warning flags emits 17 warnings across 14 headers, forcing downstream-Werrorbuilds to silence warnings onreflect-cppglobally.Summary
.default_value_ = std::nulloptinitializer to resolve-Wmissing-field-initializers.std::distanceand UTF-8 loop indexing to clear-Wsign-conversion.Real-world motivation
hudson-trading/slang-serverCMakeLists.txt#L317-L321reflect-cppheader warnings in 4 CMake locations.games-on-whales/wolfCMakeLists.txt#L38-L45FetchContent(reflect-cpp)with-w.munich-data-engineering/sqlgenCMakeLists.txt#L75-L78-Wall -Wextra -Wpedantic.openmoq/moqxCMakeLists.txt#L351FANUC-CORPORATION/fanuc_driverCMakeLists.txt#L17-Wall -Wextra -Wpedantic.Testing
-Wall -Wextra -Werror -Wsign-conversion -Wextra-semiand the existing test suite.