summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/hdr_util.h8
-rw-r--r--mkvmuxer/mkvmuxer.cc4
-rw-r--r--mkvparser/mkvparser.cc4
-rw-r--r--mkvparser_sample.cc4
-rw-r--r--vttdemux.cc4
5 files changed, 18 insertions, 6 deletions
diff --git a/common/hdr_util.h b/common/hdr_util.h
index 3ef5388..c414aaf 100644
--- a/common/hdr_util.h
+++ b/common/hdr_util.h
@@ -48,14 +48,18 @@ struct Vp9CodecFeatures {
};
// disable deprecation warnings for auto_ptr
-#if defined(__GNUC__) && __GNUC__ >= 5
+#if defined(__GNUC__)
+#if __GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
+#endif
typedef std::auto_ptr<mkvmuxer::PrimaryChromaticity> PrimaryChromaticityPtr;
-#if defined(__GNUC__) && __GNUC__ >= 5
+#if defined(__GNUC__)
+#if __GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)
#pragma GCC diagnostic pop
#endif
+#endif
bool CopyPrimaryChromaticity(const mkvparser::PrimaryChromaticity& parser_pc,
PrimaryChromaticityPtr* muxer_pc);
diff --git a/mkvmuxer/mkvmuxer.cc b/mkvmuxer/mkvmuxer.cc
index 41732fb..71f026a 100644
--- a/mkvmuxer/mkvmuxer.cc
+++ b/mkvmuxer/mkvmuxer.cc
@@ -27,9 +27,11 @@
#include "mkvparser/mkvparser.h"
// disable deprecation warnings for auto_ptr
-#if defined(__GNUC__) && __GNUC__ >= 5
+#if defined(__GNUC__)
+#if __GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
+#endif
namespace mkvmuxer {
diff --git a/mkvparser/mkvparser.cc b/mkvparser/mkvparser.cc
index d8b2343..d4f8e5e 100644
--- a/mkvparser/mkvparser.cc
+++ b/mkvparser/mkvparser.cc
@@ -23,9 +23,11 @@
#include "common/webmids.h"
// disable deprecation warnings for auto_ptr
-#if defined(__GNUC__) && __GNUC__ >= 5
+#if defined(__GNUC__)
+#if __GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
+#endif
namespace mkvparser {
const float MasteringMetadata::kValueNotPresent = FLT_MAX;
diff --git a/mkvparser_sample.cc b/mkvparser_sample.cc
index fbd125d..6f7dc00 100644
--- a/mkvparser_sample.cc
+++ b/mkvparser_sample.cc
@@ -17,9 +17,11 @@
#include "mkvparser/mkvreader.h"
// disable deprecation warnings for auto_ptr
-#if defined(__GNUC__) && __GNUC__ >= 5
+#if defined(__GNUC__)
+#if __GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
+#endif
namespace {
const wchar_t* utf8towcs(const char* str) {
diff --git a/vttdemux.cc b/vttdemux.cc
index 47529e2..62f987d 100644
--- a/vttdemux.cc
+++ b/vttdemux.cc
@@ -21,9 +21,11 @@
using std::string;
// disable deprecation warnings for auto_ptr
-#if defined(__GNUC__) && __GNUC__ >= 5
+#if defined(__GNUC__)
+#if __GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
+#endif
namespace libwebm {
namespace vttdemux {