Merge "disable -Wdeprecated-declarations in legacy code"
diff --git a/common/hdr_util.h b/common/hdr_util.h
index 689fb30..3ef5388 100644
--- a/common/hdr_util.h
+++ b/common/hdr_util.h
@@ -47,7 +47,15 @@
   int chroma_subsampling;
 };
 
+// disable deprecation warnings for auto_ptr
+#if defined(__GNUC__) && __GNUC__ >= 5
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
 typedef std::auto_ptr<mkvmuxer::PrimaryChromaticity> PrimaryChromaticityPtr;
+#if defined(__GNUC__) && __GNUC__ >= 5
+#pragma GCC diagnostic pop
+#endif
 
 bool CopyPrimaryChromaticity(const mkvparser::PrimaryChromaticity& parser_pc,
                              PrimaryChromaticityPtr* muxer_pc);
diff --git a/mkvmuxer/mkvmuxer.cc b/mkvmuxer/mkvmuxer.cc
index 3a43b95..15b9a90 100644
--- a/mkvmuxer/mkvmuxer.cc
+++ b/mkvmuxer/mkvmuxer.cc
@@ -24,6 +24,11 @@
 #include "mkvmuxer/mkvwriter.h"
 #include "mkvparser/mkvparser.h"
 
+// disable deprecation warnings for auto_ptr
+#if defined(__GNUC__) && __GNUC__ >= 5
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
+
 namespace mkvmuxer {
 
 const float PrimaryChromaticity::kChromaticityMin = 0.0f;
diff --git a/mkvmuxer_sample.cc b/mkvmuxer_sample.cc
index e2cbfc0..b590c89 100644
--- a/mkvmuxer_sample.cc
+++ b/mkvmuxer_sample.cc
@@ -29,6 +29,11 @@
 
 #include "sample_muxer_metadata.h"
 
+// disable deprecation warnings for auto_ptr
+#if defined(__GNUC__) && __GNUC__ >= 5
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
+
 namespace {
 
 void Usage() {
diff --git a/mkvparser/mkvparser.cc b/mkvparser/mkvparser.cc
index c96d263..37f230d 100644
--- a/mkvparser/mkvparser.cc
+++ b/mkvparser/mkvparser.cc
@@ -22,6 +22,11 @@
 
 #include "common/webmids.h"
 
+// disable deprecation warnings for auto_ptr
+#if defined(__GNUC__) && __GNUC__ >= 5
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
+
 namespace mkvparser {
 const float MasteringMetadata::kValueNotPresent = FLT_MAX;
 const long long Colour::kValueNotPresent = LLONG_MAX;
diff --git a/mkvparser_sample.cc b/mkvparser_sample.cc
index 77aa47b..fbd125d 100644
--- a/mkvparser_sample.cc
+++ b/mkvparser_sample.cc
@@ -16,6 +16,11 @@
 #include "mkvparser/mkvparser.h"
 #include "mkvparser/mkvreader.h"
 
+// disable deprecation warnings for auto_ptr
+#if defined(__GNUC__) && __GNUC__ >= 5
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
+
 namespace {
 const wchar_t* utf8towcs(const char* str) {
   if (str == NULL)
diff --git a/vttdemux.cc b/vttdemux.cc
index 52a2661..47529e2 100644
--- a/vttdemux.cc
+++ b/vttdemux.cc
@@ -20,6 +20,11 @@
 
 using std::string;
 
+// disable deprecation warnings for auto_ptr
+#if defined(__GNUC__) && __GNUC__ >= 5
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
+
 namespace libwebm {
 namespace vttdemux {