ThePassionate opened a new pull request, #17995:
URL: https://github.com/apache/nuttx/pull/17995

   ## Crypto: Fix Blake2S Header Compilation Warning
   
   ### Summary
   
   This PR fixes a compilation warning in the Blake2S header file caused by 
invalid preprocessing directive syntax. The change improves code quality and 
ensures clean compilation with strict compiler settings.
   
   ### Changes
   
   #### Files Modified
   
   1. **include/nuttx/crypto/blake2s.h**
      - Fix preprocessing directive syntax from `#ifdef __GNUC__ > 3` to `#if 
defined(__GNUC__) && __GNUC__ > 3`
      - Ensures proper version checking for GCC compiler features
   
   ### Technical Details
   
   **Issue:**
   - The original preprocessing directive `#ifdef __GNUC__ > 3` is invalid 
syntax
   - Preprocessors cannot use comparison operators in `#ifdef` directives
   - This causes compilation warnings with strict compiler toolchains (e.g., 
TASKING compiler)
   
   **Solution:**
   - Use proper `#if defined()` syntax combined with logical AND operator
   - Allows correct detection of GCC compiler and version checking
   - Maintains the same functional behavior while using valid preprocessor 
syntax
   
   **Benefits:**
   - Eliminates compilation warnings in strict compiler environments
   - Improves code portability across different toolchains
   - Uses standard preprocessor conditional syntax
   
   ### Impact
   
   - **Compatibility**: Improves compatibility with strict compiler toolchains
   - **Code Quality**: Eliminates compiler warnings
   - **Functionality**: No change to actual code functionality; only fixes 
syntax
   
   ### Testing
   
   No functional impact; existing Blake2S functionality remains unchanged.
   
   ---
   
   **Author**: makejian <[email protected]>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to