Skip to content

Commit 04e3f5c

Browse files
committed
test: Disable Woverflow warnings in a couple of tests
These tests use constants which are too large for systems with 32-bit doubles, but the tests are still useful checks for inf support. Signed-off-by: Keith Packard <[email protected]>
1 parent ecca133 commit 04e3f5c

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

test/libc-testsuite/snprintf.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
#pragma GCC diagnostic ignored "-Wformat-extra-args"
3434
#pragma GCC diagnostic ignored "-Wformat"
3535
#pragma GCC diagnostic ignored "-Wformat-truncation"
36+
#pragma GCC diagnostic ignored "-Woverflow"
3637

3738
#define DISABLE_SLOW_TESTS
3839

test/test-efcvt.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@ const struct test ecvt_tests[] = {
5353
{ 1.0e-12, 4, -11, 0, "1000" },
5454
};
5555

56+
#pragma GCC diagnostic ignored "-Wpragmas"
57+
#pragma GCC diagnostic ignored "-Wunknown-warning-option"
58+
#pragma GCC diagnostic ignored "-Wunused-value"
59+
#pragma GCC diagnostic ignored "-Woverflow"
60+
#pragma GCC diagnostic ignored "-Wliteral-range"
61+
5662
#if !defined(TINY_STDIO) && !defined(NO_NEWLIB)
5763
#define ecvt_r(n, dig, dec, sign, buf, len) (ecvtbuf(n, dig, dec, sign, buf) ? 0 : -1)
5864
#define fcvt_r(n, dig, dec, sign, buf, len) (fcvtbuf(n, dig, dec, sign, buf) ? 0 : -1)

test/test-strtod.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@
4141
#define FULL_TESTS
4242
#endif
4343

44+
#pragma GCC diagnostic ignored "-Wpragmas"
45+
#pragma GCC diagnostic ignored "-Wunknown-warning-option"
46+
#pragma GCC diagnostic ignored "-Wunused-value"
47+
#pragma GCC diagnostic ignored "-Woverflow"
48+
#pragma GCC diagnostic ignored "-Wliteral-range"
49+
4450
static const struct {
4551
char *string;
4652
double dvalue;

0 commit comments

Comments
 (0)