Re: [FFmpeg-devel] [PATCH 2/2] lavd/decklink_common: Fix error caused by -Werror=missing-prototypes

2016-06-23 Thread Richard Kern

> On Jun 23, 2016, at 8:06 PM, Carl Eugen Hoyos  wrote:
> 
> Rick Kern  gmail.com> writes:
> 
>> This temporarily disables the missing-prototypes error so 
>> the file can be included.
> 
> Can't you add -Wno-error=missing-prototypes to the cxx flags 
> just as you did in 1/2?

This was just disabling it for the bad include instead of every file. I’ll add 
it to the cxx flags - much cleaner anyway.

> 
> Thank you for working on this, I like 1/2, Carl Eugen
> 
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 2/2] lavd/decklink_common: Fix error caused by -Werror=missing-prototypes

2016-06-23 Thread Carl Eugen Hoyos
Rick Kern  gmail.com> writes:

> This temporarily disables the missing-prototypes error so 
> the file can be included.

Can't you add -Wno-error=missing-prototypes to the cxx flags 
just as you did in 1/2?

Thank you for working on this, I like 1/2, Carl Eugen

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH 2/2] lavd/decklink_common: Fix error caused by -Werror=missing-prototypes

2016-06-23 Thread Rick Kern
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 
---
 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 
 #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 
+
+#if AV_GCC_VERSION_AT_LEAST(4, 6)
+#pragma GCC diagnostic pop
+#elif defined(__clang__)
+#pragma clang diagnostic pop
+#warning clang
+#endif
 #endif
 
 #include 
-- 
2.9.0

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel