Skip to content

Commit 3a42f3b

Browse files
committed
Only suppress warning for versions of GCC where it exists.
1 parent bae372a commit 3a42f3b

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/webots/maths/WbMathsUtilities.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,9 @@ int WbMathsUtilities::convexHull(const QVector<WbVector2> &points, QVector<int>
109109

110110
// Ignore false positive warning produced by some versions of GCC.
111111
#pragma GCC diagnostic push
112+
#if __GNUC__ >= 7
112113
#pragma GCC diagnostic ignored "-Wstringop-overflow"
114+
#endif
113115
QVector<int> index(size);
114116
#pragma GCC diagnostic pop
115117
for (i = 0; i < size; ++i)

0 commit comments

Comments
 (0)