Skip to content

Commit ef37ae4

Browse files
committed
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.
1 parent f81607b commit ef37ae4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

misc/levenshtein.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ void initDistanceArray(DistanceArray &distanceArray, const size_t size1, const s
3333
const auto maxDistance(size1 + size2);
3434
// ignore warning about null pointer dereference for now (which is *likely* not correct)
3535
#ifdef __GNUC__
36+
#pragma GCC diagnostic push
3637
#pragma GCC diagnostic ignored "-Wnull-dereference"
3738
#endif
3839
distanceArray.at(0, 0) = maxDistance;

0 commit comments

Comments
 (0)