Skip to content

Commit df0779b

Browse files
Maybe
1 parent af97b83 commit df0779b

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

middleware/include/bitstream.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@
99
#include <math.h>
1010

1111
/* Throws a compile-time error if the assert fails */
12-
#define STATIC_ASSERT(condition, message) \
13-
typedef char static_assertion_##__LINE__[(condition) ? 1 : -1]
12+
#define STATIC_ASSERT(condition, message) \
13+
do { \
14+
typedef char static_assertion_##__LINE__[(condition) ? 1 : -1]; \
15+
} while (0)
1416

1517
typedef struct {
1618
uint8_t *data; // The bitstream data, stored as bytes

0 commit comments

Comments
 (0)