From 35333005758b69383c8ef31008fa84e07d6c4ad5 Mon Sep 17 00:00:00 2001 From: Gines Hidalgo Date: Sun, 15 Nov 2020 20:11:48 -0500 Subject: [PATCH] Removed CLang warnings Signed-off-by: Gines Hidalgo --- doc/release_notes.md | 3 ++- include/openpose/thread/thread.hpp | 6 +++--- src/openpose/3d/poseTriangulation.cpp | 1 + src/openpose/core/matrix.cpp | 2 ++ src/openpose/pose/poseExtractorNet.cpp | 2 +- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/doc/release_notes.md b/doc/release_notes.md index 518fff4c..374151dd 100644 --- a/doc/release_notes.md +++ b/doc/release_notes.md @@ -421,8 +421,9 @@ OpenPose Library - Release Notes 3. Added Asynchronous mode to Python API. 4. Added `DOWNLOAD_SERVER` variable to CMake. It specifies the link where the models and 3rd party libraries will be downloaded from. 5. Installation documentation highly simplified and improved. - 6. Removed all compiler warnings for Ubuntu 20.04 and removed some for Windows 10. + 6. Removed all compiler warnings for Ubuntu 20.04 (GCC and Clang) as well as some for Windows 10. 2. Functions or parameters renamed: + 1. `USE_MKL` disabled by default in Ubuntu. Reason: Not compatible with non-intel CPUs and Ubuntu 20. 3. Main bugs fixed: 1. 90 and 270-degree rotations working again. 2. C++ tutorial API demos only try to cv::imshow the image if it is not empty (avoding the assert that it would trigger otherwise). diff --git a/include/openpose/thread/thread.hpp b/include/openpose/thread/thread.hpp index 64a314be..4a38b0d8 100644 --- a/include/openpose/thread/thread.hpp +++ b/include/openpose/thread/thread.hpp @@ -120,7 +120,7 @@ namespace op { stopAndJoin(); spIsRunning = isRunningSharedPtr; - *spIsRunning = {true}; + *spIsRunning = true; threadFunction(); } catch (const std::exception& e) @@ -136,7 +136,7 @@ namespace op { opLog("", Priority::Low, __LINE__, __FUNCTION__, __FILE__); stopAndJoin(); - *spIsRunning = {true}; + *spIsRunning = true; mThread = {std::thread{&Thread::threadFunction, this}}; } catch (const std::exception& e) @@ -209,7 +209,7 @@ namespace op { try { - *spIsRunning = {false}; + *spIsRunning = false; } catch (const std::exception& e) { diff --git a/src/openpose/3d/poseTriangulation.cpp b/src/openpose/3d/poseTriangulation.cpp index 0b544dfb..fe6b9f0b 100644 --- a/src/openpose/3d/poseTriangulation.cpp +++ b/src/openpose/3d/poseTriangulation.cpp @@ -21,6 +21,7 @@ namespace op catch (const std::exception& e) { error(e.what(), __LINE__, __FUNCTION__, __FILE__); + return false; } } diff --git a/src/openpose/core/matrix.cpp b/src/openpose/core/matrix.cpp index 3cc25e09..2c171764 100644 --- a/src/openpose/core/matrix.cpp +++ b/src/openpose/core/matrix.cpp @@ -104,6 +104,7 @@ namespace op catch (const std::exception& e) { error(e.what(), __LINE__, __FUNCTION__, __FILE__); + return nullptr; } } @@ -116,6 +117,7 @@ namespace op catch (const std::exception& e) { error(e.what(), __LINE__, __FUNCTION__, __FILE__); + return nullptr; } } diff --git a/src/openpose/pose/poseExtractorNet.cpp b/src/openpose/pose/poseExtractorNet.cpp index 2684ccc2..9623d0a5 100644 --- a/src/openpose/pose/poseExtractorNet.cpp +++ b/src/openpose/pose/poseExtractorNet.cpp @@ -344,7 +344,7 @@ namespace op opLog("Property " + std::to_string((int)property) + " set from " + std::to_string(propertyElement) + " to " + std::to_string(value), Priority::High); - propertyElement = {value}; + propertyElement = value; } catch (const std::exception& e) { -- GitLab