Disabled assert() could use its argument to avoid unused variable warnings
Open
- Dominant language
- C
- Stars
- 27.9k
- Forks
- 2.6k
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 8
Description
Test this construction for disabling assertions:
```c
#define assert(condition) \
do { \
if (0) { \
(void)(condition); \
} \
} while (0)
```
Additionally, do the same for `RAWLOG()` and `DEBUGLOG()` when `DEBUGLEVEL < 2`.
This would avoid unused variable warnings that show up in production.
Contributor guide
Assessment
This issue has not been assessed yet.