Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions wolfssl/wolfcrypt/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,11 @@
((defined(BUILDING_WOLFSSL) && defined(WOLFSSL_USE_OPTIONS_H)) || \
(defined(BUILDING_WOLFSSL) && defined(WOLFSSL_OPTIONS_H) && \
!defined(EXTERNAL_OPTS_OPENVPN)))
#warning wolfssl/options.h included in compiled wolfssl library object.
#if !defined(_MSC_VER) && !defined(__TASKING__)
#warning wolfssl/options.h included in compiled wolfssl library object.
#else
#pragma message("Warning: wolfssl/options.h included in compiled wolfssl library object.")
#endif
Comment on lines +352 to +356
Copy link

Copilot AI Apr 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#pragma message("...") is MSVC-style syntax, but this branch also covers __TASKING__. If TASKING expects a different pragma-message form (commonly #pragma message "..." without parentheses), this may still fail on TASKING. Consider splitting the branches so _MSC_VER and __TASKING__ each use the exact syntax supported by their compiler, rather than sharing a single #pragma message spelling.

Copilot uses AI. Check for mistakes.
#endif

#ifdef WOLFSSL_USER_SETTINGS
Expand All @@ -369,7 +373,11 @@
* an application build -- then your application can avoid this warning by
* defining WOLFSSL_NO_OPTIONS_H or WOLFSSL_CUSTOM_CONFIG as appropriate.
*/
#warning "No configuration for wolfSSL detected, check header order"
#if !defined(_MSC_VER) && !defined(__TASKING__)
#warning "No configuration for wolfSSL detected, check header order"
#else
#pragma message("Warning: No configuration for wolfSSL detected, check header order")
#endif
Comment on lines +376 to +380
Copy link

Copilot AI Apr 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same compiler-conditional warning pattern is duplicated in multiple places. To reduce repetition (and the chance of future divergence between warning sites), consider introducing a small internal macro/helper in this header (e.g., a WOLFSSL_BUILD_WARNING(<text>)) and reuse it for both warning emissions.

Copilot uses AI. Check for mistakes.
#endif

/* Ensure WOLFSSL_DEBUG_CERTS is set when DEBUG_WOLFSSL is enabled, unless
Expand Down
Loading