Skip to content

Commit 4dc8186

Browse files
committed
fix: fix c macros extension warning on gcc
1 parent 755ee4d commit 4dc8186

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/graphics/video_renderer_embedded.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,21 @@
66
#include "helper/graphic_utils.hpp"
77
#include "video_renderer.hpp"
88

9+
#if defined(__GNUC__)
10+
#pragma GCC diagnostic push
11+
#pragma GCC diagnostic ignored "-Wold-style-cast"
12+
#endif
13+
914
extern "C" {
15+
1016
#include <libavcodec/avcodec.h>
1117
#include <libavformat/avformat.h>
1218
#include <libavutil/avutil.h>
1319
#include <libavutil/log.h>
1420
#include <libswscale/swscale.h>
1521
}
1622

23+
1724
#include <csignal>
1825
#include <future>
1926
#include <sys/wait.h>
@@ -421,6 +428,10 @@ namespace {
421428
} // namespace
422429

423430

431+
#if defined(__GNUC__)
432+
#pragma GCC diagnostic pop
433+
#endif
434+
424435
void VideoRendererBackend::is_supported_async(const std::function<void(bool)>& callback) {
425436
callback(true);
426437
}

0 commit comments

Comments
 (0)