Skip to content

Commit 3c9d02c

Browse files
committed
Merge pull request cpp-netlib#367 from ruslo/define.warnings
Fix compiler warnings
2 parents 90c8964 + ece375e commit 3c9d02c

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

logging/test/logging_log_record.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
#include <gtest/gtest.h>
99

1010
#include <network/logging/logging.hpp>
11-
#define NETWORK_ENABLE_LOGGING
11+
#ifndef NETWORK_ENABLE_LOGGING
12+
# define NETWORK_ENABLE_LOGGING
13+
#endif
1214
#include <network/detail/debug.hpp>
1315

1416
using namespace network::logging;
@@ -73,4 +75,4 @@ TEST(logging_log_record, macro_log) {
7375
NETWORK_MESSAGE("This is a log through the macro.");
7476
NETWORK_MESSAGE("This is a log through the macro, with a stream! Num="
7577
<< 42 << " - OK!");
76-
}
78+
}

message/src/network/detail/debug.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
1616
The user can force the logging to be enabled by defining NETWORK_ENABLE_LOGGING.
1717
*/
18-
#if defined(NETWORK_DEBUG) && defined(NETWORK_ENABLE_LOGGING)
18+
#if defined(NETWORK_DEBUG) && !defined(NETWORK_ENABLE_LOGGING)
1919
#define NETWORK_ENABLE_LOGGING
2020
#endif
2121

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy