macro: introduce DISABLE_WARNING_TYPE_LIMITS and make use of it everywhere
This commit is contained in:
@@ -633,8 +633,7 @@ static void test_tempfn(void) {
|
||||
static const char chars[] =
|
||||
"Aąę„”\n루\377";
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wtype-limits"
|
||||
DISABLE_WARNING_TYPE_LIMITS;
|
||||
|
||||
static void test_fgetc(void) {
|
||||
_cleanup_fclose_ FILE *f = NULL;
|
||||
@@ -665,7 +664,7 @@ static void test_fgetc(void) {
|
||||
assert_se(safe_fgetc(f, &c) == 0);
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
REENABLE_WARNING;
|
||||
|
||||
static const char buffer[] =
|
||||
"Some test data\n"
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
/* Print information about various types. Useful when diagnosing
|
||||
* gcc diagnostics on an unfamiliar architecture. */
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wtype-limits"
|
||||
DISABLE_WARNING_TYPE_LIMITS;
|
||||
|
||||
#define info(t) \
|
||||
printf("%s → %zu bits%s, %zu byte alignment\n", STRINGIFY(t), \
|
||||
|
||||
Reference in New Issue
Block a user