Skip to content

Commit 6ce9d43

Browse files
committed
Suppress gcc warnings. Fixes #216
1 parent 0e329e6 commit 6ce9d43

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

tests/tester.cc

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
11
#define TINYOBJLOADER_IMPLEMENTATION
22
#include "../tiny_obj_loader.h"
33

4-
#ifdef __GNUC__
4+
#if defined(__clang__)
5+
#pragma clang diagnostic push
6+
#pragma clang diagnostic ignored "-Weverything"
7+
#elif defined(__GNUC__)
58
#pragma GCC diagnostic ignored "-Wmissing-declarations"
9+
#pragma GCC diagnostic ignored "-Wignored-qualifiers"
10+
#pragma GCC diagnostic push
611
#pragma GCC diagnostic ignored "-Wcast-qual"
712
#pragma GCC diagnostic ignored "-Wsign-conversion"
813
#pragma GCC diagnostic ignored "-Wformat"
914
#pragma GCC diagnostic ignored "-Wswitch-default"
1015
#endif
1116

12-
#ifdef __clang__
13-
#pragma clang diagnostic push
14-
#pragma clang diagnostic ignored "-Weverything"
15-
#endif
16-
1717

1818
#include "acutest.h"
1919

20-
#ifdef __clang__
20+
#if defined(__clang__)
2121
#pragma clang diagnostic pop
22+
#elif defined(__GNUC__)
23+
#pragma GCC diagnostic pop
2224
#endif
2325

2426
#include <cassert>
@@ -1058,6 +1060,7 @@ void test_initialize_all_texopts() {
10581060
bool ret = tinyobj::LoadObj(&attrib, &shapes, &materials, &warn, &err,
10591061
"../models/cornell_box.obj", gMtlBasePath, false);
10601062

1063+
TEST_CHECK(ret == true);
10611064
TEST_CHECK(0 < materials.size());
10621065

10631066
#define TEST_CHECK_DEFAULT_TEXOPT(texopt) \

0 commit comments

Comments
 (0)