Tasking Warning#10263
Conversation
Tasking compiler does not support #warning and needs the #pragma message case where available. This will fix the wolfSSH QNX nightly from failing.
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adjusts compile-time warning directives to support the TASKING compiler (and MSVC) by replacing unsupported #warning usage with #pragma message where needed, preventing QNX nightly failures.
Changes:
- Wrapped existing
#warningdirectives with compiler checks for_MSC_VERand__TASKING__. - Added
#pragma message(...)fallbacks for compilers that don’t support#warningin this context.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| #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 |
There was a problem hiding this comment.
#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.
| #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 |
There was a problem hiding this comment.
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.
|
Closing to change the name of the branch to something without "warning" in it. |
Description
Tasking compiler does not support #warning and needs the #pragma message case where available. This will fix the wolfSSH QNX nightly from failing. Similar fix to PR #10225.
Testing
The test for the QNX build of wolfSSH.
Checklist