fjpanag commented on PR #12303:
URL: https://github.com/apache/nuttx/pull/12303#issuecomment-2102728594

   > this patch doesn't change the assertion behavior, only the warning of 
unused variable may generate in the new patch if you use assert, but it's 
required by spec.
   
   This is not correct.
   
   Please see how the `ASSERT()` definition was moved from 
[here](https://github.com/apache/nuttx/pull/12303/commits/5eaf6083c5c864d976841f45c48ae1a731b495fb#diff-d1f563977d4d567fcfa3de881a2bf7f6ae116fb2857c4f083734a105719a051eL126)
 to 
[here](https://github.com/apache/nuttx/pull/12303/commits/5eaf6083c5c864d976841f45c48ae1a731b495fb#diff-d1f563977d4d567fcfa3de881a2bf7f6ae116fb2857c4f083734a105719a051eR132),
 i.e. the macro was always active before and now it is conditionally active 
based on `NDEBUG`.
   
   If `ASSERT()` follows `NDEBUG`, then what is its difference with `assert()`? 
They are the same thing. Then why not just remove `ASSERT()` completely?
   
   But as it has been discussed before in the mailing list, it is considered 
beneficial for the kernel to have its own assertion macros, and have the 
ability to control them independently from the apps.


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