mirror of
https://github.com/SChernykh/p2pool.git
synced 2024-12-23 03:49:23 +00:00
Suppress MSVC warnings
This commit is contained in:
parent
92e20485b2
commit
c3c326c680
2 changed files with 4 additions and 0 deletions
|
@ -23,18 +23,21 @@
|
||||||
#define FORCEINLINE __forceinline
|
#define FORCEINLINE __forceinline
|
||||||
#define NOINLINE __declspec(noinline)
|
#define NOINLINE __declspec(noinline)
|
||||||
#define LIKELY(expression) expression
|
#define LIKELY(expression) expression
|
||||||
|
#define MSVC_PRAGMA(...) __pragma(__VA_ARGS__)
|
||||||
|
|
||||||
#elif __GNUC__
|
#elif __GNUC__
|
||||||
|
|
||||||
#define FORCEINLINE __attribute__((always_inline)) inline
|
#define FORCEINLINE __attribute__((always_inline)) inline
|
||||||
#define NOINLINE __attribute__((noinline))
|
#define NOINLINE __attribute__((noinline))
|
||||||
#define LIKELY(expression) __builtin_expect(expression, 1)
|
#define LIKELY(expression) __builtin_expect(expression, 1)
|
||||||
|
#define MSVC_PRAGMA(...)
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#define FORCEINLINE inline
|
#define FORCEINLINE inline
|
||||||
#define NOINLINE
|
#define NOINLINE
|
||||||
#define LIKELY(expression) expression
|
#define LIKELY(expression) expression
|
||||||
|
#define MSVC_PRAGMA(...)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -500,6 +500,7 @@ struct DummyStream
|
||||||
#define SIDE_EFFECT_CHECK(level, ...) \
|
#define SIDE_EFFECT_CHECK(level, ...) \
|
||||||
do { \
|
do { \
|
||||||
if (0) { \
|
if (0) { \
|
||||||
|
MSVC_PRAGMA(warning(suppress:26444)) \
|
||||||
[=]() { \
|
[=]() { \
|
||||||
log::DummyStream x; \
|
log::DummyStream x; \
|
||||||
x << level << __VA_ARGS__; \
|
x << level << __VA_ARGS__; \
|
||||||
|
|
Loading…
Reference in a new issue