You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "PetervdPerk-NXP (via GitHub)" <gi...@apache.org> on 2023/06/05 07:54:06 UTC

[GitHub] [nuttx] PetervdPerk-NXP opened a new pull request, #9477: Assert.h revert #5647 cast assert() to void when NDEBUG is defined

PetervdPerk-NXP opened a new pull request, #9477:
URL: https://github.com/apache/nuttx/pull/9477

   ## Summary
   Fixes #9467 
   By casting `assert(f)` directly to `(void)(1)` to maintain compatibility with other libc implementations
   
   ## Impact
   Minimal, no functionality changes only compilation warnings
   
   ## Testing
   CI
   
   


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] PetervdPerk-NXP commented on pull request #9477: Assert.h revert #5647 cast assert() to void when NDEBUG is defined

Posted by "PetervdPerk-NXP (via GitHub)" <gi...@apache.org>.
PetervdPerk-NXP commented on PR #9477:
URL: https://github.com/apache/nuttx/pull/9477#issuecomment-1678527765

   > unused warning in microADB
   
   Is from an external repository, furthermore I think this is just one of many compile warnings that will become errors.
   Since #5647 came in a year ago already so probably many `-Wunused-variable` and `-Wunused-but-set-variable` warnings slipped in.


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] pkarashchenko commented on pull request #9477: Assert.h revert #5647 cast assert() to void when NDEBUG is defined

Posted by "pkarashchenko (via GitHub)" <gi...@apache.org>.
pkarashchenko commented on PR #9477:
URL: https://github.com/apache/nuttx/pull/9477#issuecomment-1576409894

   Seems like now we need to add a bunch of `UNUSED` in the code


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] PetervdPerk-NXP commented on pull request #9477: Assert.h revert #5647 cast assert() to void when NDEBUG is defined

Posted by "PetervdPerk-NXP (via GitHub)" <gi...@apache.org>.
PetervdPerk-NXP commented on PR #9477:
URL: https://github.com/apache/nuttx/pull/9477#issuecomment-1677309296

   Any update about this regarding compatibility with any library using assertions and targeting glibc?
   @patacongo  @acassis @davids5 


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] xiaoxiang781216 commented on pull request #9477: Assert.h revert #5647 cast assert() to void when NDEBUG is defined

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on PR #9477:
URL: https://github.com/apache/nuttx/pull/9477#issuecomment-1678567122

   > > unused warning in microADB
   > 
   > Is from an external repository, furthermore I think this is just one of many compile warnings that will become errors. Since #5647 came in a year ago already so probably many `-Wunused-variable` and `-Wunused-but-set-variable` warnings slipped in.
   
   Most third-party library will compile with glibc, musl and bionic, so the problem is more likely happen in apps/nuttx, which can be fixed directly.


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] xiaoxiang781216 commented on pull request #9477: Assert.h revert #5647 cast assert() to void when NDEBUG is defined

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on PR #9477:
URL: https://github.com/apache/nuttx/pull/9477#issuecomment-1577144300

   > @xiaoxiang781216 should we use the same approach for debug assertions?
   
   Since DEBUGASSERT is nuttx specific macro, it could have the different rule.
   
   > Seems like now we need to add a bunch of `UNUSED` in the code now
   
   So, you understand why it's good ideal to keep the expression even NDEBUG is defined.


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] pkarashchenko commented on pull request #9477: Assert.h revert #5647 cast assert() to void when NDEBUG is defined

Posted by "pkarashchenko (via GitHub)" <gi...@apache.org>.
pkarashchenko commented on PR #9477:
URL: https://github.com/apache/nuttx/pull/9477#issuecomment-1576313884

   @xiaoxiang781216 should we use the same approach for debug assertions?


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] xiaoxiang781216 commented on pull request #9477: Assert.h revert #5647 cast assert() to void when NDEBUG is defined

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on PR #9477:
URL: https://github.com/apache/nuttx/pull/9477#issuecomment-1677613888

   It's right to keep the compatibility with other libc implementation. Let's continue to fix the unused warning in  microADB.


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org