mirror of https://github.com/wolfSSL/wolfssh.git
Update Pragma Macro Use
1. The wrapper for the pragma PRAGMA_GCC_DIAG_PUSH and its friends are not set up to be used like a function. Remove the semicolons after their usage. (Clang doesn't care, but MSVC does.)pull/661/head
parent
6dd53b12ec
commit
8c28f7a3a5
|
@ -120,13 +120,13 @@ char* myoptarg = NULL;
|
|||
#define AssertStrLE(x, y) AssertStr(x, y, <=, >)
|
||||
|
||||
#define AssertPtr(x, y, op, er) do { \
|
||||
PRAGMA_GCC_DIAG_PUSH; \
|
||||
PRAGMA_GCC_DIAG_PUSH \
|
||||
/* remarkably, without this inhibition, */ \
|
||||
/* the _Pragma()s make the declarations warn. */ \
|
||||
PRAGMA_GCC("GCC diagnostic ignored \"-Wdeclaration-after-statement\""); \
|
||||
PRAGMA_GCC("GCC diagnostic ignored \"-Wdeclaration-after-statement\"") \
|
||||
/* inhibit "ISO C forbids conversion of function pointer */ \
|
||||
/* to object pointer type [-Werror=pedantic]" */ \
|
||||
PRAGMA_GCC("GCC diagnostic ignored \"-Wpedantic\""); \
|
||||
PRAGMA_GCC("GCC diagnostic ignored \"-Wpedantic\"") \
|
||||
void* _x = (void*)(x); \
|
||||
void* _y = (void*)(y); \
|
||||
Assert(_x op _y, ("%s " #op " %s", #x, #y), ("%p " #er " %p", _x, _y)); \
|
||||
|
|
Loading…
Reference in New Issue