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

   The modification is mainly based on the following specifications: 
   misra_c_2004_rule_10_6_violation
   misra_c_2012_rule_8_9_violation
   misra_c_2012_rule_10_4_violation
   
   *Note: Please adhere to [Contributing 
Guidelines](https://github.com/apache/nuttx/blob/master/CONTRIBUTING.md).*
   
   ## Summary
   
   This PR refactors the CRC calculation code in `libs/libc/misc` to improve 
compliance with the MISRA-C coding standard. The changes include:
   - Replacing static CRC lookup tables with new tables using the 'u' suffix 
for constants.
   - Updating variable names and types for better clarity and type safety.
   - Ensuring all loop counters and constants use unsigned types.
   - Improving code readability and maintainability.
   - Addressing the following MISRA-C violations:
     - MISRA-C:2004 Rule 10.6
     - MISRA-C:2012 Rule 8.9
     - MISRA-C:2012 Rule 10.4
   
   No functional changes are introduced; the modifications are limited to code 
style and safety improvements.
   
   ## Impact
   
   - No impact on functionality or performance.
   - Improved code safety and maintainability.
   - Enhanced compliance with industry coding standards.
   
   ## Testing
   
   - Built and tested on the default Nuttx configuration.
   - All CRC-related unit tests pass as before.
   - No regressions observed in existing test cases.
   
   


-- 
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