Skip to content

Commit 1c5719c

Browse files
committed
Refactor false-positive suppression for GCC 7
1 parent 985bc2a commit 1c5719c

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

.travis.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ matrix:
5252
packages: ['g++-7']
5353
env:
5454
- CXX=g++-7
55-
- CXXFLAGS="-Wall -Wextra -Wno-maybe-uninitialized -Werror -O3"
5655

5756
- compiler: gcc
5857
addons:
@@ -62,7 +61,6 @@ matrix:
6261
env:
6362
- CXX=g++-7
6463
- CXXSTD=-std=c++17
65-
- CXXFLAGS="-Wall -Wextra -Wno-maybe-uninitialized -Werror -O3"
6664

6765
- compiler: clang
6866
addons:
@@ -182,7 +180,6 @@ matrix:
182180
env:
183181
- CXX=g++-7
184182
- CPPFLAGS=-fsanitize=undefined
185-
- CXXFLAGS="-Wall -Wextra -Wno-maybe-uninitialized -Werror -O3"
186183

187184
- compiler: gcc
188185
sudo: required
@@ -193,7 +190,6 @@ matrix:
193190
env:
194191
- CXX=g++-7
195192
- CPPFLAGS="-fsanitize=address -fuse-ld=gold"
196-
- CXXFLAGS="-Wall -Wextra -Wno-maybe-uninitialized -Werror -O3"
197193

198194
- compiler: clang
199195
addons:

src/test/json/compare.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33

44
#include "test.hpp"
55

6+
// prevent false positives from GCC 7
7+
#if defined( __GNUC__ ) && ( __GNUC__ == 7 )
8+
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
9+
#endif
10+
611
#include <tao/json/from_string.hpp>
712
#include <tao/json/value.hpp>
813

0 commit comments

Comments
 (0)