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

bump abieos submodule to newer rapidjson submodule to fix c++20 warnings #1630

Merged
merged 2 commits into from
Sep 13, 2023

Conversation

spoonincode
Copy link
Member

Some newer clang compilers are warning on rapidjson comparisons in c++20 mode.

Requires review of AntelopeIO/abieos#21

⚠️ This will mean we have two different revisions of rapidjson used in this repo. The rapidjson used in libfc (for webauthn parsing) remains at 01950eb while abieos' moves from 01950eb to 476ffa2. The danger here is an ODR violation. However, the only file that can include the 01950eb version,

# try and make this very clear that this json parser is intended only for webauthn parsing..
set_source_files_properties(src/crypto/elliptic_webauthn.cpp PROPERTIES INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/include/fc/crypto/webauthn_json/include")

places that version in a special namespace
#define RAPIDJSON_NAMESPACE_BEGIN namespace fc::crypto::webauthn::detail::rapidjson {
#define RAPIDJSON_NAMESPACE_END }
#include "rapidjson/reader.h"

which ought to be sufficient to avoid ODR problems.

Fortunately, the warnings do not show up for the webauthn usage.

@spoonincode spoonincode merged commit d5e0814 into main Sep 13, 2023
@spoonincode spoonincode deleted the abieos_rapidjson_c++20 branch September 13, 2023 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants