Skip to content

Commit 47033c4

Browse files
Merge pull request #9826 from Frauschi/declaration-after-statement
Wdeclaration-after-statement fixes
2 parents a08efc9 + 96fc896 commit 47033c4

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

.github/workflows/no-malloc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ jobs:
1919
config: [
2020
# Add new configs here
2121
'--enable-rsa --enable-keygen --disable-dh CFLAGS="-DWOLFSSL_NO_MALLOC -DRSA_MIN_SIZE=1024 -pedantic -Wdeclaration-after-statement -DTEST_LIBWOLFSSL_SOURCES_INCLUSION_SEQUENCE"',
22+
'--enable-ecc --enable-rsa --enable-keygen --enable-ed25519 --enable-curve25519 --enable-ed448 --enable-curve448 --enable-mlkem CFLAGS="-DWOLFSSL_NO_MALLOC -pedantic -Wdeclaration-after-statement -DTEST_LIBWOLFSSL_SOURCES_INCLUSION_SEQUENCE"',
23+
'--enable-ecc --enable-rsa --enable-keygen --enable-ed25519 --enable-curve25519 --enable-ed448 --enable-curve448 --enable-mlkem --enable-staticmemory CFLAGS="-DWOLFSSL_NO_MALLOC -pedantic -Wdeclaration-after-statement -DTEST_LIBWOLFSSL_SOURCES_INCLUSION_SEQUENCE"',
2224
]
2325
name: make check
2426
if: github.repository_owner == 'wolfssl'

tests/suites.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -909,6 +909,10 @@ int SuiteTest(int argc, char** argv)
909909
char argv0[3][80];
910910
char* myArgv[3];
911911

912+
#ifdef WOLFSSL_STATIC_MEMORY
913+
byte memory[200000];
914+
#endif
915+
912916
printf(" Begin Cipher Suite Tests\n");
913917

914918
/* setup */
@@ -918,10 +922,6 @@ int SuiteTest(int argc, char** argv)
918922
args.argv = myArgv;
919923
XSTRLCPY(argv0[0], "SuiteTest", sizeof(argv0[0]));
920924

921-
#ifdef WOLFSSL_STATIC_MEMORY
922-
byte memory[200000];
923-
#endif
924-
925925
cipherSuiteCtx = wolfSSL_CTX_new(wolfSSLv23_client_method());
926926
if (cipherSuiteCtx == NULL) {
927927
printf("can't get cipher suite ctx\n");

wolfcrypt/test/test.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21039,7 +21039,6 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t memory_test(void)
2103921039
{
2104021040
wc_test_ret_t ret = 0;
2104121041
word32 j = 0; /* used in embedded const pointer test */
21042-
WOLFSSL_ENTER("memory_test");
2104321042

2104421043
#if defined(COMPLEX_MEM_TEST) || defined(WOLFSSL_STATIC_MEMORY)
2104521044
int i;
@@ -21053,6 +21052,8 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t memory_test(void)
2105321052
* alignment when tests are ran */
2105421053
#endif
2105521054

21055+
WOLFSSL_ENTER("memory_test");
21056+
2105621057
#ifdef WOLFSSL_STATIC_MEMORY
2105721058
/* check macro settings */
2105821059
if (sizeof(size)/sizeof(word32) != WOLFMEM_DEF_BUCKETS) {

0 commit comments

Comments
 (0)