[x265] [PATCH] silence GCC 8 warnings -Wclass-memaccess and -Wcast-function-type
Ma0
mateuszb at poczta.onet.pl
Sat Dec 15 02:16:30 CET 2018
# HG changeset patch
# User Ma0 <mateuszb at poczta.onet.pl>
# Date 1544836394 -3600
# Sat Dec 15 02:13:14 2018 +0100
# Node ID c829b5b75a9f9937635be2f6f59dd6c4e6cf50ef
# Parent 81373aab81dfe2e31a5ef353b1073d8bf1e22502
silence GCC 8 warnings -Wclass-memaccess and -Wcast-function-type
diff -r 81373aab81df -r c829b5b75a9f source/CMakeLists.txt
--- a/source/CMakeLists.txt Thu Dec 13 10:55:15 2018 +0530
+++ b/source/CMakeLists.txt Sat Dec 15 02:13:14 2018 +0100
@@ -200,6 +200,9 @@
if(GCC)
add_definitions(-Wall -Wextra -Wshadow)
add_definitions(-D__STDC_LIMIT_MACROS=1)
+ if(NOT INTEL_CXX AND NOT CLANG AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 8.0)
+ add_definitions(-Wno-class-memaccess)
+ endif()
if(ENABLE_HDR10_PLUS)
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.8")
message(FATAL_ERROR "gcc version above 4.8 required to support hdr10plus")
diff -r 81373aab81df -r c829b5b75a9f source/encoder/api.cpp
--- a/source/encoder/api.cpp Thu Dec 13 10:55:15 2018 +0530
+++ b/source/encoder/api.cpp Sat Dec 15 02:13:14 2018 +0100
@@ -694,6 +694,10 @@
#define ext ".so"
#endif
+#if defined(__GNUC__) && __GNUC__ >= 8
+#pragma GCC diagnostic ignored "-Wcast-function-type"
+#endif
+
static int g_recursion /* = 0 */;
const x265_api* x265_api_get(int bitDepth)
More information about the x265-devel
mailing list