8000 Extended the range of a suppressed warning for MSVC (#10039) · archerli/arangodb@aa14af9 · GitHub
[go: up one dir, main page]

Skip to content

Commit aa14af9

Browse files
goedderzmchacki
authored andcommitted
Extended the range of a suppressed warning for MSVC (arangodb#10039)
1 parent dd10909 commit aa14af9

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

lib/Basics/ArangoGlobalContext.cpp

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,13 @@ inline void ADB_WindowsExitFunction(int, void*) {}
6262

6363
#include <regex>
6464

65+
#if (_MSC_VER >= 1)
66+
// Disable a warning caused by the call to ADB_WindowsExitFunction() in
67+
// ~ArangoGlobalContext().
68+
#pragma warning(push)
69+
#pragma warning(disable : 4722) // destructor never returns, potential memory leak
70+
#endif
71+
6572
using namespace arangodb;
6673
using namespace arangodb::basics;
6774

@@ -204,14 +211,8 @@ ArangoGlobalContext::~ArangoGlobalContext() {
204211

205212
TRIAGENS_REST_SHUTDOWN;
206213
ADB_WindowsExitFunction(_ret, nullptr);
207-
#if (_MSC_VER >= 1)
208-
#pragma warning(push)
209-
#pragma warning(disable : 4722) // destructor never returns, potential memory leak
210-
#endif
211214
}
212-
#if (_MSC_VER >= 1)
213-
#pragma warning(pop)
214-
#endif
215+
215216
int ArangoGlobalContext::exit(int ret) {
216217
_ret = ret;
217218
return _ret;
@@ -385,3 +386,7 @@ void ArangoGlobalContext::normalizePath(std::string& path, char const* whichPath
385386
}
386387
}
387388
}
389+
390+
#if (_MSC_VER >= 1)
391+
#pragma warning(pop)
392+
#endif

0 commit comments

Comments
 (0)
0