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:
Martchus 2021-12-20 22:46:38 +01:00
parent f81607be82
commit ef37ae437c
1 changed files with 1 additions and 0 deletions

View File

@ -33,6 +33,7 @@ void initDistanceArray(DistanceArray &distanceArray, const size_t size1, const s
const auto maxDistance(size1 + size2);
// ignore warning about null pointer dereference for now (which is *likely* not correct)
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wnull-dereference"
#endif
distanceArray.at(0, 0) = maxDistance;