1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-15 04:15:44 +03:00

Define and use DISCARD

This commit is contained in:
jflyper 2019-01-21 04:59:21 +09:00
parent 35ade68bb3
commit f96508ceec
2 changed files with 5 additions and 3 deletions

View file

@ -55,9 +55,11 @@
#define PP_CALL(macro, ...) macro(__VA_ARGS__)
#if !defined(UNUSED)
#define UNUSED(x) (void)(x)
#define UNUSED(x) (void)(x) // Variables and parameters that are not used
#endif
#define DISCARD(x) (void)(x) // To explicitly ignore result of x (usually an I/O register access).
#define STATIC_ASSERT(condition, name) _Static_assert((condition), #name)