Fix compile error with Clang related to diagnostic pragma
Fix ``` pragma diagnostic pop could not pop, no matching push ``` The GCC documentation says "If a pop has no matching push, the command-line options are restored." but that's apparently not working here.
This commit is contained in:
parent
f81607be82
commit
ef37ae437c
|
@ -33,6 +33,7 @@ void initDistanceArray(DistanceArray &distanceArray, const size_t size1, const s
|
||||||
const auto maxDistance(size1 + size2);
|
const auto maxDistance(size1 + size2);
|
||||||
// ignore warning about null pointer dereference for now (which is *likely* not correct)
|
// ignore warning about null pointer dereference for now (which is *likely* not correct)
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wnull-dereference"
|
#pragma GCC diagnostic ignored "-Wnull-dereference"
|
||||||
#endif
|
#endif
|
||||||
distanceArray.at(0, 0) = maxDistance;
|
distanceArray.at(0, 0) = maxDistance;
|
||||||
|
|
Loading…
Reference in New Issue