[FFmpeg-devel] [PATCH 2/2] lavd/decklink_common: Fix error caused by -Werror=missing-prototypes
Rick Kern
kernrj at gmail.com
Fri Jun 24 01:08:06 CEST 2016
decklink_common.cpp includes a .cpp file from the DeckLink API which fails
to build because there are non-static functions in the included .cpp file.
This temporarily disables the missing-prototypes error so the file can
be included.
Signed-off-by: Rick Kern <kernrj at gmail.com>
---
libavdevice/decklink_common.cpp | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/libavdevice/decklink_common.cpp b/libavdevice/decklink_common.cpp
index ac7964c..f4d4275 100644
--- a/libavdevice/decklink_common.cpp
+++ b/libavdevice/decklink_common.cpp
@@ -23,7 +23,25 @@
#ifdef _WIN32
#include <DeckLinkAPI_i.c>
#else
+#include "libavutil/attributes.h"
+
+#if AV_GCC_VERSION_AT_LEAST(4, 6)
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wmissing-prototypes"
+# warning GCC
+#elif defined(__clang__)
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wmissing-prototypes"
+#endif
+
#include <DeckLinkAPIDispatch.cpp>
+
+#if AV_GCC_VERSION_AT_LEAST(4, 6)
+# pragma GCC diagnostic pop
+#elif defined(__clang__)
+# pragma clang diagnostic pop
+# warning clang
+#endif
#endif
#include <pthread.h>
--
2.9.0
More information about the ffmpeg-devel
mailing list