forked from wolfSSL/wolfssl
fix several more C89 "comma at end of enumerator list" spots in 64-bit-only headers, missed in earlier passes; in tests/unit.h, add a WOLF_C89 definition of AssertPtr() without pragmas, to avoid a -Wdeclaration-after-statement.
This commit is contained in:
12
tests/unit.h
12
tests/unit.h
@@ -88,6 +88,16 @@
|
||||
#define AssertStrGE(x, y) AssertStr(x, y, >=, <)
|
||||
#define AssertStrLE(x, y) AssertStr(x, y, <=, >)
|
||||
|
||||
#ifdef WOLF_C89
|
||||
|
||||
#define AssertPtr(x, y, op, er) do { \
|
||||
void* _x = (void*)(x); \
|
||||
void* _y = (void*)(y); \
|
||||
Assert(_x op _y, ("%s " #op " %s", #x, #y), ("%p " #er " %p", _x, _y)); \
|
||||
} while(0)
|
||||
|
||||
#else
|
||||
|
||||
#define AssertPtr(x, y, op, er) do { \
|
||||
PRAGMA_GCC_DIAG_PUSH; \
|
||||
/* remarkably, without this inhibition, */ \
|
||||
@@ -102,6 +112,8 @@
|
||||
PRAGMA_GCC_DIAG_POP; \
|
||||
} while(0)
|
||||
|
||||
#endif
|
||||
|
||||
#define AssertPtrEq(x, y) AssertPtr(x, y, ==, !=)
|
||||
#define AssertPtrNE(x, y) AssertPtr(x, y, !=, ==)
|
||||
#define AssertPtrGT(x, y) AssertPtr(x, y, >, <=)
|
||||
|
@@ -69,7 +69,7 @@
|
||||
enum {
|
||||
Ed25519 = -1,
|
||||
Ed25519ctx = 0,
|
||||
Ed25519ph = 1,
|
||||
Ed25519ph = 1
|
||||
};
|
||||
|
||||
#ifndef WC_ED25519KEY_TYPE_DEFINED
|
||||
@@ -80,7 +80,7 @@ enum {
|
||||
/* ED25519 Flags */
|
||||
enum {
|
||||
WC_ED25519_FLAG_NONE = 0x00,
|
||||
WC_ED25519_FLAG_DEC_SIGN = 0x01,
|
||||
WC_ED25519_FLAG_DEC_SIGN = 0x01
|
||||
};
|
||||
|
||||
/* An ED25519 Key */
|
||||
|
@@ -69,7 +69,7 @@
|
||||
|
||||
enum {
|
||||
Ed448 = 0,
|
||||
Ed448ph = 1,
|
||||
Ed448ph = 1
|
||||
};
|
||||
|
||||
#ifndef WC_ED448KEY_TYPE_DEFINED
|
||||
|
@@ -78,6 +78,8 @@ enum {
|
||||
WC_SHA3_384_BLOCK_SIZE = 104,
|
||||
WC_SHA3_512_BLOCK_SIZE = 72,
|
||||
#endif
|
||||
|
||||
WOLF_ENUM_DUMMY_LAST_ELEMENT(WC_SHA3)
|
||||
};
|
||||
|
||||
#ifndef NO_OLD_WC_NAMES
|
||||
|
@@ -140,7 +140,7 @@ enum {
|
||||
|
||||
WC_SHA512_256_BLOCK_SIZE = WC_SHA512_BLOCK_SIZE,
|
||||
WC_SHA512_256_DIGEST_SIZE = 32,
|
||||
WC_SHA512_256_PAD_SIZE = WC_SHA512_PAD_SIZE,
|
||||
WC_SHA512_256_PAD_SIZE = WC_SHA512_PAD_SIZE
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user