1
0
Fork 0
forked from lthn/blockchain

removed multiple warnings over gcc/clang compilers

This commit is contained in:
cryptozoidberg 2022-10-11 16:05:48 +02:00
parent cfafa1e73d
commit 2927edf16a
No known key found for this signature in database
GPG key ID: 22DEB97A54C6FDEC
4 changed files with 9 additions and 5 deletions

View file

@ -103,7 +103,7 @@ else()
else()
set(ARCH_FLAG "-march=${ARCH}")
endif()
set(WARNINGS "-Wall -Wextra -Wpointer-arith -Wvla -Wwrite-strings -Wno-error=extra -Wno-error=deprecated-declarations -Wno-error=sign-compare -Wno-error=strict-aliasing -Wno-error=type-limits -Wno-unused-parameter -Wno-error=unused-variable -Wno-aggregate-return -Wno-comment -Wcomment -Wno-unknown-pragmas")
set(WARNINGS "-Wall -Wextra -Wpointer-arith -Wvla -Wwrite-strings -Wno-error=extra -Wno-error=deprecated-declarations -Wno-error=sign-compare -Wno-error=strict-aliasing -Wno-error=type-limits -Wno-unused-parameter -Wno-error=unused-variable -Wno-aggregate-return -Wno-comment -Wcomment -Wno-unknown-pragmas -Wno-pragmas")
# if(NOT APPLE)
# set(WARNINGS "${WARNINGS} -Werror")
# endif()
@ -135,7 +135,7 @@ else()
else()
set(APPLE_FLAG "")
endif()
set(C_WARNINGS "-Waggregate-return -Wnested-externs -Wstrict-prototypes")
set(C_WARNINGS "-Waggregate-return -Wnested-externs -Wstrict-prototypes -Wcomment")
set(CXX_WARNINGS "-Wno-reorder -Wno-missing-field-initializers")
try_compile(STATIC_ASSERT_RES "${CMAKE_CURRENT_BINARY_DIR}/static-assert" "${CMAKE_CURRENT_SOURCE_DIR}/utils/test-static-assert.c" COMPILE_DEFINITIONS "-std=c++14")
if(STATIC_ASSERT_RES)

View file

@ -462,6 +462,9 @@ namespace
TransformD64Type TransformD64_4way = nullptr;
TransformD64Type TransformD64_8way = nullptr;
PUSH_GCC_WARNINGS
DISABLE_GCC_AND_CLANG_WARNING(unused-function)
bool SelfTest() {
// Input state (equal to the initial SHA256 state)
static const uint32_t init[8] = {
@ -626,7 +629,7 @@ std::string SHA256AutoDetect()
assert(SelfTest());
return ret;
}
POP_GCC_WARNINGS
////// SHA-256
CSHA256::CSHA256() : bytes(0)

View file

@ -14,7 +14,7 @@ namespace crypto
#define DBG_VAL_PRINT(x) (void(0)) // std::cout << #x ": " << x << std::endl
#define DBG_PRINT(x) (void(0)) // std::cout << x << std::endl
static std::ostream &operator <<(std::ostream &o, const crypto::hash &v) { return o << pod_to_hex(v); }
//static std::ostream &operator <<(std::ostream &o, const crypto::hash &v) { return o << pod_to_hex(v); }
bool generate_CLSAG_GG(const hash& m, const std::vector<CLSAG_GG_input_ref_t>& ring, const point_t& pseudo_out_amount_commitment, const key_image& ki,
const scalar_t& secret_x, const scalar_t& secret_f, uint64_t secret_index, CLSAG_GG_signature& sig)

View file

@ -757,4 +757,5 @@ if (cond)
ss << mess; \
LOG_ERROR("THROW EXCEPTION: wallet_common_error"); \
tools::error::throw_wallet_ex<tools::error::wallet_common_error>(std::string(__FILE__ ":" STRINGIZE(__LINE__)), ss.str()); \
}
}