Skip to content

Commit 3c2a92d

Browse files
authored
Merge pull request #10225 from kareem-wolfssl/zd21544
Fix uninitialized before use warning. Fix unsupported #warning directive by Tasking compiler.
2 parents cd6b062 + 5defbc3 commit 3c2a92d

6 files changed

Lines changed: 12 additions & 11 deletions

File tree

.wolfssl_known_macro_extras

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1076,6 +1076,7 @@ __STRICT_ANSI__
10761076
__SUNPRO_C
10771077
__SUNPRO_CC
10781078
__SVR4
1079+
__TASKING__
10791080
__TI_COMPILER_VERSION__
10801081
__TURBOC__
10811082
__UNIX__

src/tls.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ static int TLSX_PopulateSupportedGroups(WOLFSSL* ssl, TLSX** extensions);
187187
#error The build option WC_RSA_PSS is required for TLS 1.3 with RSA
188188
#endif
189189
#ifndef HAVE_TLS_EXTENSIONS
190-
#ifndef _MSC_VER
190+
#if !defined(_MSC_VER) && !defined(__TASKING__)
191191
#error "The build option HAVE_TLS_EXTENSIONS is required for TLS 1.3"
192192
#else
193193
#pragma message("Error: The build option HAVE_TLS_EXTENSIONS is required for TLS 1.3")
@@ -198,7 +198,7 @@ static int TLSX_PopulateSupportedGroups(WOLFSSL* ssl, TLSX** extensions);
198198
/* Warn if secrets logging is enabled */
199199
#if (defined(SHOW_SECRETS) || defined(WOLFSSL_SSLKEYLOGFILE)) && \
200200
!defined(WOLFSSL_KEYLOG_EXPORT_WARNED)
201-
#ifndef _MSC_VER
201+
#if !defined(_MSC_VER) && !defined(__TASKING__)
202202
#warning The SHOW_SECRETS and WOLFSSL_SSLKEYLOGFILE options should only be used for debugging and never in a production environment
203203
#else
204204
#pragma message("Warning: The SHOW_SECRETS and WOLFSSL_SSLKEYLOGFILE options should only be used for debugging and never in a production environment")

src/tls13.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119
#endif
120120

121121
#ifndef HAVE_AEAD
122-
#ifndef _MSC_VER
122+
#if !defined(_MSC_VER) && !defined(__TASKING__)
123123
#error "The build option HAVE_AEAD is required for TLS 1.3"
124124
#else
125125
#pragma \
@@ -128,15 +128,15 @@
128128
#endif
129129

130130
#ifndef HAVE_HKDF
131-
#ifndef _MSC_VER
131+
#if !defined(_MSC_VER) && !defined(__TASKING__)
132132
#error "The build option HAVE_HKDF is required for TLS 1.3"
133133
#else
134134
#pragma message("error: The build option HAVE_HKDF is required for TLS 1.3")
135135
#endif
136136
#endif
137137

138138
#ifndef HAVE_TLS_EXTENSIONS
139-
#ifndef _MSC_VER
139+
#if !defined(_MSC_VER) && !defined(__TASKING__)
140140
#error "The build option HAVE_TLS_EXTENSIONS is required for TLS 1.3"
141141
#else
142142
#pragma message("error: The build option HAVE_TLS_EXTENSIONS is required for TLS 1.3")

wolfcrypt/src/dilithium.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12457,9 +12457,9 @@ int wc_Dilithium_PublicKeyDecode(const byte* input, word32* inOutIdx,
1245712457
#if !defined(WOLFSSL_DILITHIUM_NO_ASN1)
1245812458
int keyType = 0;
1245912459
#else
12460-
int length;
12461-
unsigned char* oid;
12462-
int oidLen;
12460+
int length = 0;
12461+
unsigned char* oid = NULL;
12462+
int oidLen = 0;
1246312463
word32 idx = 0;
1246412464
#endif
1246512465

wolfcrypt/src/random.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3920,7 +3920,7 @@ int wc_GenerateSeed(OS_Seed* os, byte* output, word32 sz)
39203920
#endif
39213921

39223922
#ifdef USE_TEST_GENSEED
3923-
#ifndef _MSC_VER
3923+
#if !defined(_MSC_VER) && !defined(__TASKING__)
39243924
#warning "write a real random seed!!!!, just for testing now"
39253925
#else
39263926
#pragma message("Warning: write a real random seed!!!!, just for testing now")

wolfssl/wolfcrypt/settings.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4160,7 +4160,7 @@ extern void uITRON4_free(void *p) ;
41604160
(!defined(NO_RSA) && !defined(WC_RSA_BLINDING) && !defined(HAVE_FIPS) && \
41614161
!defined(WC_NO_RNG))
41624162

4163-
#ifndef _MSC_VER
4163+
#if !defined(_MSC_VER) && !defined(__TASKING__)
41644164
#warning "For timing resistance / side-channel attack prevention consider using harden options"
41654165
#else
41664166
#pragma message("Warning: For timing resistance / side-channel attack prevention consider using harden options")
@@ -4511,7 +4511,7 @@ extern void uITRON4_free(void *p) ;
45114511
#if defined(HAVE_SECURE_RENEGOTIATION) && !defined(HAVE_EXTENDED_MASTER) && \
45124512
(defined(HAVE_SESSION_TICKET) || !defined(NO_SESSION_CACHE))
45134513
/* secure renegotiation requires extended master secret with resumption */
4514-
#ifndef _MSC_VER
4514+
#if !defined(_MSC_VER) && !defined(__TASKING__)
45154515
#warning Extended master secret must be enabled with secure renegotiation and session resumption
45164516
#else
45174517
#pragma message("Warning: Extended master secret must be enabled with secure renegotiation and session resumption")

0 commit comments

Comments
 (0)