Disabled assert() could use its argument to avoid unused variable warnings
Offen
- Vorherrschende Sprache
- C
- Sterne
- 27.9k
- Forks
- 2.6k
- Ø Merge
- 1 T. 3 Std.
- Gemergte PRs (30 T.)
- 8
Beschreibung
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.
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.