diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 00e893848a..e044deb43c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -419,7 +419,7 @@ jobs: - name: Configure CMake run: | export PATH=${{env.ANDROID_NDK_HOME}}:$PATH - cmake -DCMAKE_TOOLCHAIN_FILE=${{env.ANDROID_NDK_HOME}}/build/cmake/android.toolchain.cmake -DANDROID_NATIVE_API_LEVEL=${{env.ANDROID_SDK_VERSION}} -DANDROID_ABI=${{env.ANDROID_ABI}} -DBEAM_IPFS_SUPPORT=Off -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} . + cmake -DCMAKE_TOOLCHAIN_FILE=${{env.ANDROID_NDK_HOME}}/build/cmake/android.toolchain.cmake -DANDROID_NATIVE_API_LEVEL=${{env.ANDROID_SDK_VERSION}} -DANDROID_ABI=${{env.ANDROID_ABI}} -DBEAM_IPFS_SUPPORT=Off -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_CXX_FLAGS="-Wno-error=deprecated-literal-operator -Wno-deprecated-literal-operator" . ############################################################################### # Build diff --git a/3rdparty/libbitcoin/CMakeLists.txt b/3rdparty/libbitcoin/CMakeLists.txt index 7cf77a10f4..0f12086099 100644 --- a/3rdparty/libbitcoin/CMakeLists.txt +++ b/3rdparty/libbitcoin/CMakeLists.txt @@ -61,6 +61,7 @@ if(MSVC) target_compile_options(${TARGET_NAME} PUBLIC "/wd4245") target_compile_options(${TARGET_NAME} PUBLIC "/wd4505") target_compile_options(${TARGET_NAME} PUBLIC "/wd4996") + target_compile_options(${TARGET_NAME} PUBLIC "/wd4702") elseif(APPLE) target_compile_options(${TARGET_NAME} PUBLIC -Wno-mismatched-tags) target_compile_options(${TARGET_NAME} PUBLIC -Wno-missing-braces) diff --git a/3rdparty/libbitcoin/src/chain/CMakeLists.txt b/3rdparty/libbitcoin/src/chain/CMakeLists.txt index b2c578385d..1b21583f82 100644 --- a/3rdparty/libbitcoin/src/chain/CMakeLists.txt +++ b/3rdparty/libbitcoin/src/chain/CMakeLists.txt @@ -12,6 +12,7 @@ if(MSVC) target_compile_options(${TARGET_NAME} PUBLIC "/wd4273") target_compile_options(${TARGET_NAME} PUBLIC "/wd4251") target_compile_options(${TARGET_NAME} PUBLIC "/wd4189") + target_compile_options(${TARGET_NAME} PUBLIC "/wd4702") elseif(APPLE OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang") target_compile_options(${TARGET_NAME} PUBLIC -Wno-mismatched-tags) target_compile_options(${TARGET_NAME} PUBLIC -Wno-unused-variable) diff --git a/3rdparty/libbitcoin/src/machine/CMakeLists.txt b/3rdparty/libbitcoin/src/machine/CMakeLists.txt index 9569956c6b..5e9da7fff6 100644 --- a/3rdparty/libbitcoin/src/machine/CMakeLists.txt +++ b/3rdparty/libbitcoin/src/machine/CMakeLists.txt @@ -8,6 +8,7 @@ if(MSVC) target_compile_options(${TARGET_NAME} PUBLIC "/wd4245") target_compile_options(${TARGET_NAME} PUBLIC "/wd4505") target_compile_options(${TARGET_NAME} PUBLIC "/wd4996") + target_compile_options(${TARGET_NAME} PUBLIC "/wd4702") elseif(APPLE) target_compile_options(${TARGET_NAME} PUBLIC -Wno-mismatched-tags) target_compile_options(${TARGET_NAME} PUBLIC -Wno-missing-braces) diff --git a/3rdparty/libbitcoin/src/message/CMakeLists.txt b/3rdparty/libbitcoin/src/message/CMakeLists.txt index eb9bcfda25..035ee4b719 100644 --- a/3rdparty/libbitcoin/src/message/CMakeLists.txt +++ b/3rdparty/libbitcoin/src/message/CMakeLists.txt @@ -9,6 +9,7 @@ if(MSVC) target_compile_options(${TARGET_NAME} PUBLIC "/wd4245") target_compile_options(${TARGET_NAME} PUBLIC "/wd4505") target_compile_options(${TARGET_NAME} PUBLIC "/wd4996") + target_compile_options(${TARGET_NAME} PUBLIC "/wd4702") elseif(APPLE) target_compile_options(${TARGET_NAME} PUBLIC -Wno-mismatched-tags) target_compile_options(${TARGET_NAME} PUBLIC -Wno-missing-braces) diff --git a/3rdparty/libbitcoin/src/wallet/CMakeLists.txt b/3rdparty/libbitcoin/src/wallet/CMakeLists.txt index 96216f1970..e1d352d177 100644 --- a/3rdparty/libbitcoin/src/wallet/CMakeLists.txt +++ b/3rdparty/libbitcoin/src/wallet/CMakeLists.txt @@ -13,6 +13,7 @@ if(MSVC) target_compile_options(${TARGET_NAME} PUBLIC "/wd4458") target_compile_options(${TARGET_NAME} PUBLIC "/wd4996") target_compile_options(${TARGET_NAME} PUBLIC "/wd4251") + target_compile_options(${TARGET_NAME} PUBLIC "/wd4702") elseif(APPLE OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang") target_compile_options(${TARGET_NAME} PUBLIC -Wno-mismatched-tags) target_compile_options(${TARGET_NAME} PUBLIC -Wno-unused-variable) diff --git a/CMakeLists.txt b/CMakeLists.txt index 55c6cc3888..338804f58d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -298,6 +298,7 @@ else() if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 15 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 15) add_compile_definitions(_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION) #boost@1.76/1.76.0_4/include/boost/container_hash/hash.hpp:131:33 endif() + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-enum-constexpr-conversion -Wno-error=enum-constexpr-conversion") endif() # Temporal solution if(ANDROID AND CMAKE_CXX_COMPILER_ID MATCHES "Clang") diff --git a/explorer/adapter.cpp b/explorer/adapter.cpp index 80cadec45f..092222f58d 100644 --- a/explorer/adapter.cpp +++ b/explorer/adapter.cpp @@ -752,7 +752,7 @@ class Adapter : public Node::IObserver, public IAdapter { { return (Rules::Consensus::Pbft == Rules::get().m_Consensus) ? MakeDecimalDelta<3>(t_ms) : - MakeDecimal(static_cast(t_ms / 1000)); + MakeDecimalDelta<0>(static_cast(t_ms / 1000)); } json get_status() override { diff --git a/utility/CMakeLists.txt b/utility/CMakeLists.txt index 595a597ff7..823db15b92 100644 --- a/utility/CMakeLists.txt +++ b/utility/CMakeLists.txt @@ -51,6 +51,7 @@ endif() if (MSVC) set_source_files_properties(logger.cpp PROPERTIES COMPILE_FLAGS "/wd4996") # 'std::fpos<_Mbstatet>::seekpos': warning STL4019: The member std::fpos::seekpos() is non-Standard + add_compile_options(/wd4702) endif() add_library(utility STATIC ${UTILITY_SRC} ${IO_SRC}) diff --git a/wallet/core/wallet_db.cpp b/wallet/core/wallet_db.cpp index fa1b778670..8f17e146af 100644 --- a/wallet/core/wallet_db.cpp +++ b/wallet/core/wallet_db.cpp @@ -5311,9 +5311,12 @@ namespace beam::wallet stm.bind(6, isRead); stm.step(); - for (const auto sub : m_subscribers) + if (sqlite3_changes(_db) > 0) { - sub->onIMSaved(time, counterpart, message, isIncome); + for (const auto sub : m_subscribers) + { + sub->onIMSaved(time, counterpart, message, isIncome); + } } }