|
132 | 132 | #define DIAG_ON_STRICT_PROTOTYPES \ |
133 | 133 | DIAG_DO_PRAGMA(clang diagnostic pop) |
134 | 134 | #endif |
135 | | -#elif ND_IS_AT_LEAST_GNUC_VERSION(4,2) |
| 135 | +#elif ND_IS_AT_LEAST_GNUC_VERSION(4,6) |
136 | 136 | /* GCC apparently doesn't complain about ORing enums together. */ |
137 | 137 |
|
138 | 138 | /* |
|
145 | 145 | #define DIAG_ON_CAST_QUAL \ |
146 | 146 | DIAG_DO_PRAGMA(GCC diagnostic pop) |
147 | 147 |
|
148 | | - #if ND_IS_AT_LEAST_GNUC_VERSION(4,5) |
149 | | - /* |
150 | | - * GCC warns about unused return values if a function is marked as |
151 | | - * "warn about ignoring this function's return value". |
152 | | - * |
153 | | - * Clang appears to let you ignore a result without a warning by |
154 | | - * casting the function result to void, so we don't appear to |
155 | | - * need this for Clang. |
156 | | - */ |
157 | | - #define DIAG_OFF_WARN_UNUSED_RESULT \ |
158 | | - DIAG_DO_PRAGMA(GCC diagnostic push) \ |
159 | | - DIAG_DO_PRAGMA(GCC diagnostic ignored "-Wunused-result") |
160 | | - #define DIAG_ON_WARN_UNUSED_RESULT \ |
161 | | - DIAG_DO_PRAGMA(GCC diagnostic pop) |
162 | | - #endif |
| 148 | + /* |
| 149 | + * GCC warns about unused return values if a function is marked as |
| 150 | + * "warn about ignoring this function's return value". |
| 151 | + * |
| 152 | + * Clang appears to let you ignore a result without a warning by |
| 153 | + * casting the function result to void, so we don't appear to |
| 154 | + * need this for Clang. |
| 155 | + */ |
| 156 | + #define DIAG_OFF_WARN_UNUSED_RESULT \ |
| 157 | + DIAG_DO_PRAGMA(GCC diagnostic push) \ |
| 158 | + DIAG_DO_PRAGMA(GCC diagnostic ignored "-Wunused-result") |
| 159 | + #define DIAG_ON_WARN_UNUSED_RESULT \ |
| 160 | + DIAG_DO_PRAGMA(GCC diagnostic pop) |
163 | 161 |
|
164 | 162 | /* |
165 | 163 | * Suppress deprecation warnings. |
|
0 commit comments