mirror of
https://github.com/SChernykh/p2pool.git
synced 2024-11-16 15:57:39 +00:00
Fixed compiler warnings in tests
This commit is contained in:
parent
bfa8334aeb
commit
6d121122f8
2 changed files with 9 additions and 9 deletions
16
src/log.h
16
src/log.h
|
@ -470,14 +470,6 @@ namespace {
|
|||
#define CONCAT(a, b) CONCAT2(a, b)
|
||||
#define CONCAT2(a, b) a##b
|
||||
|
||||
#ifdef P2POOL_LOG_DISABLE
|
||||
|
||||
#define LOGINFO(level, ...)
|
||||
#define LOGWARN(level, ...)
|
||||
#define LOGERR(level, ...)
|
||||
|
||||
#else
|
||||
|
||||
// This is to check that LOG() call doesn't modify variables in scope, making program behavior dependent on the log level:
|
||||
//
|
||||
// int some_func(int& n) { return ++n; }
|
||||
|
@ -508,6 +500,14 @@ struct DummyStream
|
|||
} \
|
||||
} while (0)
|
||||
|
||||
#ifdef P2POOL_LOG_DISABLE
|
||||
|
||||
#define LOGINFO(level, ...) SIDE_EFFECT_CHECK(level, __VA_ARGS__)
|
||||
#define LOGWARN(level, ...) SIDE_EFFECT_CHECK(level, __VA_ARGS__)
|
||||
#define LOGERR(level, ...) SIDE_EFFECT_CHECK(level, __VA_ARGS__)
|
||||
|
||||
#else
|
||||
|
||||
#define LOG(level, severity, ...) \
|
||||
do { \
|
||||
SIDE_EFFECT_CHECK(level, __VA_ARGS__); \
|
||||
|
|
|
@ -55,7 +55,7 @@ TEST(hash, empty)
|
|||
hash h;
|
||||
ASSERT_EQ(h.empty(), true);
|
||||
|
||||
for (int i = 0; i < HASH_SIZE; ++i) {
|
||||
for (size_t i = 0; i < HASH_SIZE; ++i) {
|
||||
hash h2;
|
||||
h2.h[i] = 1;
|
||||
ASSERT_EQ(h2.empty(), false);
|
||||
|
|
Loading…
Reference in a new issue