From fbf8799cb52100dcffff604c1b4ec7870b1e26ee Mon Sep 17 00:00:00 2001 From: Jackie9527 <80555200+Jackie9527@users.noreply.github.com> Date: Sat, 1 Apr 2023 10:19:52 +0800 Subject: [PATCH] Fix warning related to unused-function. Signed-off-by: Jackie9527 <80555200+Jackie9527@users.noreply.github.com> --- code/CMakeLists.txt | 1 - code/Common/StbCommon.h | 8 ++++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index 02ba7a08e..eec2eb40f 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -1198,7 +1198,6 @@ IF (ASSIMP_WARNINGS_AS_ERRORS) IF(CMAKE_CXX_COMPILER_ID MATCHES "Clang" ) # clang-cl TARGET_COMPILE_OPTIONS(assimp PRIVATE -Wall -Werror - -Wno-unused-function -Wno-microsoft-enum-value -Wno-switch-enum -Wno-covered-switch-default diff --git a/code/Common/StbCommon.h b/code/Common/StbCommon.h index 573c98ac7..5de2e176d 100644 --- a/code/Common/StbCommon.h +++ b/code/Common/StbCommon.h @@ -48,6 +48,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #pragma GCC diagnostic ignored "-Wunused-function" #endif +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wunused-function" +#endif + #ifndef STB_USE_HUNTER /* Use prefixed names for the symbols from stb_image as it is a very commonly embedded library. Including vanilla stb_image symbols causes duplicate symbol problems if assimp is linked @@ -114,3 +119,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #pragma GCC diagnostic pop #endif +#if defined(__clang__) +#pragma clang diagnostic pop +#endif