more fixes

Signed-off-by: Pratik Mankawde <3397372+pratikmankawde@users.noreply.github.com>
This commit is contained in:
Pratik Mankawde
2026-01-23 18:28:09 +00:00
parent 7dd4dbe285
commit 05ef3b1ad8
3 changed files with 17 additions and 16 deletions

View File

@@ -35,16 +35,16 @@ target_link_libraries(xrpl_boost
if(Boost_COMPILER)
target_link_libraries(xrpl_boost INTERFACE Boost::disable_autolinking)
endif()
if(SANITIZERS_ENABLED AND is_clang)
# TODO: gcc does not support -fsanitize-blacklist...can we do something else
# for gcc ?
if(NOT Boost_INCLUDE_DIRS AND TARGET Boost::headers)
get_target_property(Boost_INCLUDE_DIRS Boost::headers INTERFACE_INCLUDE_DIRECTORIES)
endif()
message(STATUS "Adding [${Boost_INCLUDE_DIRS}] to sanitizer blacklist")
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/san_bl.txt "src:${Boost_INCLUDE_DIRS}/*")
target_compile_options(opts
INTERFACE
# ignore boost headers for sanitizing
-fsanitize-blacklist=${CMAKE_CURRENT_BINARY_DIR}/san_bl.txt)
endif()
# if(SANITIZERS_ENABLED AND is_clang)
# # TODO: gcc does not support -fsanitize-blacklist...can we do something else
# # for gcc ?
# if(NOT Boost_INCLUDE_DIRS AND TARGET Boost::headers)
# get_target_property(Boost_INCLUDE_DIRS Boost::headers INTERFACE_INCLUDE_DIRECTORIES)
# endif()
# message(STATUS "Adding [${Boost_INCLUDE_DIRS}] to sanitizer blacklist")
# file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/san_bl.txt "src:${Boost_INCLUDE_DIRS}/*")
# target_compile_options(opts
# INTERFACE
# # ignore boost headers for sanitizing
# -fsanitize-blacklist=${CMAKE_CURRENT_BINARY_DIR}/san_bl.txt)
# endif()

View File

@@ -366,6 +366,7 @@ public:
base_uint&
operator&=(base_uint const& b)
{
XRPL_ASSERT(WIDTH == b.WIDTH, "input size mismatch");
for (int i = 0; i < WIDTH; i++)
data_[i] &= b.data_[i];

View File

@@ -253,7 +253,7 @@ missing_field_error(Json::StaticString name)
inline std::string
object_field_message(std::string const& name)
{
return "Invalid field '" + name + "', not object.";
return {"Invalid field '" + name + "', not object."};
}
inline Json::Value
@@ -271,7 +271,7 @@ object_field_error(Json::StaticString name)
inline std::string
invalid_field_message(std::string const& name)
{
return "Invalid field '" + name + "'.";
return {"Invalid field '" + name + "'."};
}
inline std::string
@@ -295,7 +295,7 @@ invalid_field_error(Json::StaticString name)
inline std::string
expected_field_message(std::string const& name, std::string const& type)
{
return "Invalid field '" + name + "', not " + type + ".";
return {"Invalid field '" + name + "', not " + type + "."};
}
inline std::string