Skip to content

Commit b2a8e33

Browse files
authored
Suppress ignoring return value warning (#1371)
Another try. This commit fixes the warning treated as an error. It was a blocker for gcc-7 job. Relates-To: OLPEDGE-2780 Signed-off-by: Mykola Malik <ext-mykola.malik@here.com>
1 parent 69f9760 commit b2a8e33

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/functional/olp-cpp-sdk-core/DirTest.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ void CreateDirectory(const std::string& path) { Dir::Create(path); }
4747

4848
void CreateSymLink(const std::string& to, const std::string& link) {
4949
#if !defined(_WIN32) || defined(__MINGW32__)
50-
static_cast<void>(symlink(to.c_str(), link.c_str()));
50+
// Suppress unused-result warning
51+
(void)!symlink(to.c_str(), link.c_str());
5152
#else
5253
CreateSymbolicLink(to.c_str(), link.c_str(), 0);
5354
#endif

0 commit comments

Comments
 (0)