Lines 46-51
Link Here
|
46 |
#define _alignas_(x) __attribute__((aligned(__alignof(x)))) |
46 |
#define _alignas_(x) __attribute__((aligned(__alignof(x)))) |
47 |
#define _cleanup_(x) __attribute__((cleanup(x))) |
47 |
#define _cleanup_(x) __attribute__((cleanup(x))) |
48 |
|
48 |
|
|
|
49 |
#if __GNUC__<4 || ( __GNUC__==4 && __GNUC_MINOR__<6 ) |
50 |
# define DISABLE_WARNING_DECLARATION_AFTER_STATEMENT |
51 |
# define DISABLE_WARNING_FORMAT_NONLITERAL |
52 |
# define DISABLE_WARNING_MISSING_PROTOTYPES |
53 |
# define DISABLE_WARNING_NONNULL |
54 |
# define REENABLE_WARNING |
55 |
#else |
49 |
/* Temporarily disable some warnings */ |
56 |
/* Temporarily disable some warnings */ |
50 |
#define DISABLE_WARNING_DECLARATION_AFTER_STATEMENT \ |
57 |
#define DISABLE_WARNING_DECLARATION_AFTER_STATEMENT \ |
51 |
_Pragma("GCC diagnostic push"); \ |
58 |
_Pragma("GCC diagnostic push"); \ |
Lines 65-70
Link Here
|
65 |
|
72 |
|
66 |
#define REENABLE_WARNING \ |
73 |
#define REENABLE_WARNING \ |
67 |
_Pragma("GCC diagnostic pop") |
74 |
_Pragma("GCC diagnostic pop") |
|
|
75 |
#endif |
68 |
|
76 |
|
69 |
/* automake test harness */ |
77 |
/* automake test harness */ |
70 |
#define EXIT_TEST_SKIP 77 |
78 |
#define EXIT_TEST_SKIP 77 |
Lines 173-179
static inline size_t ALIGN_TO(size_t l, size_t ali) {
Link Here
|
173 |
log_assert_failed_unreachable(t, __FILE__, __LINE__, __PRETTY_FUNCTION__); \ |
181 |
log_assert_failed_unreachable(t, __FILE__, __LINE__, __PRETTY_FUNCTION__); \ |
174 |
} while (false) |
182 |
} while (false) |
175 |
|
183 |
|
176 |
#if defined(static_assert) |
184 |
#if 0 |
177 |
/* static_assert() is sometimes defined in a way that trips up |
185 |
/* static_assert() is sometimes defined in a way that trips up |
178 |
* -Wdeclaration-after-statement, hence let's temporarily turn off |
186 |
* -Wdeclaration-after-statement, hence let's temporarily turn off |
179 |
* this warning around it. */ |
187 |
* this warning around it. */ |