diff options
| author | 2021-06-26 02:48:47 -0300 | |
|---|---|---|
| committer | 2021-06-26 03:29:31 -0300 | |
| commit | 05bd50a1cf38daf744864828c39c20d064cac4e7 (patch) | |
| tree | f91a89c1da9fd1857649ac00aa5aaded39f1c2a1 /src | |
| parent | vk_buffer_cache: Silence implicit cast warnings (diff) | |
| download | yuzu-05bd50a1cf38daf744864828c39c20d064cac4e7.tar.gz yuzu-05bd50a1cf38daf744864828c39c20d064cac4e7.tar.xz yuzu-05bd50a1cf38daf744864828c39c20d064cac4e7.zip | |
codec,vic: Disable warnings in ffmpeg headers
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/command_classes/codecs/codec.h | 8 | ||||
| -rw-r--r-- | src/video_core/command_classes/vic.cpp | 25 |
2 files changed, 29 insertions, 4 deletions
diff --git a/src/video_core/command_classes/codecs/codec.h b/src/video_core/command_classes/codecs/codec.h index 8a2a6c360..3e135a2a6 100644 --- a/src/video_core/command_classes/codecs/codec.h +++ b/src/video_core/command_classes/codecs/codec.h | |||
| @@ -14,10 +14,18 @@ extern "C" { | |||
| 14 | #pragma GCC diagnostic push | 14 | #pragma GCC diagnostic push |
| 15 | #pragma GCC diagnostic ignored "-Wconversion" | 15 | #pragma GCC diagnostic ignored "-Wconversion" |
| 16 | #endif | 16 | #endif |
| 17 | #ifdef _MSC_VER | ||
| 18 | #pragma warning(push) | ||
| 19 | #pragma warning(disable : 4242) // conversion from 'type' to 'type', possible loss of data | ||
| 20 | #pragma warning(disable : 4244) // conversion from 'type' to 'type', possible loss of data | ||
| 21 | #endif | ||
| 17 | #include <libavcodec/avcodec.h> | 22 | #include <libavcodec/avcodec.h> |
| 18 | #if defined(__GNUC__) || defined(__clang__) | 23 | #if defined(__GNUC__) || defined(__clang__) |
| 19 | #pragma GCC diagnostic pop | 24 | #pragma GCC diagnostic pop |
| 20 | #endif | 25 | #endif |
| 26 | #ifdef _MSC_VER | ||
| 27 | #pragma warning(pop) | ||
| 28 | #endif | ||
| 21 | } | 29 | } |
| 22 | 30 | ||
| 23 | namespace Tegra { | 31 | namespace Tegra { |
diff --git a/src/video_core/command_classes/vic.cpp b/src/video_core/command_classes/vic.cpp index 0a8b82f2b..5faf8c0f1 100644 --- a/src/video_core/command_classes/vic.cpp +++ b/src/video_core/command_classes/vic.cpp | |||
| @@ -3,7 +3,28 @@ | |||
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #include <array> | 5 | #include <array> |
| 6 | |||
| 7 | extern "C" { | ||
| 8 | #if defined(__GNUC__) || defined(__clang__) | ||
| 9 | #pragma GCC diagnostic push | ||
| 10 | #pragma GCC diagnostic ignored "-Wconversion" | ||
| 11 | #endif | ||
| 12 | #ifdef _MSC_VER | ||
| 13 | #pragma warning(disable : 4244) // conversion from 'type' to 'type', possible loss of data | ||
| 14 | #pragma warning(push) | ||
| 15 | #endif | ||
| 16 | #include <libswscale/swscale.h> | ||
| 17 | #if defined(__GNUC__) || defined(__clang__) | ||
| 18 | #pragma GCC diagnostic pop | ||
| 19 | #endif | ||
| 20 | #ifdef _MSC_VER | ||
| 21 | #pragma warning(pop) | ||
| 22 | #endif | ||
| 23 | } | ||
| 24 | |||
| 6 | #include "common/assert.h" | 25 | #include "common/assert.h" |
| 26 | #include "common/logging/log.h" | ||
| 27 | |||
| 7 | #include "video_core/command_classes/nvdec.h" | 28 | #include "video_core/command_classes/nvdec.h" |
| 8 | #include "video_core/command_classes/vic.h" | 29 | #include "video_core/command_classes/vic.h" |
| 9 | #include "video_core/engines/maxwell_3d.h" | 30 | #include "video_core/engines/maxwell_3d.h" |
| @@ -11,10 +32,6 @@ | |||
| 11 | #include "video_core/memory_manager.h" | 32 | #include "video_core/memory_manager.h" |
| 12 | #include "video_core/textures/decoders.h" | 33 | #include "video_core/textures/decoders.h" |
| 13 | 34 | ||
| 14 | extern "C" { | ||
| 15 | #include <libswscale/swscale.h> | ||
| 16 | } | ||
| 17 | |||
| 18 | namespace Tegra { | 35 | namespace Tegra { |
| 19 | 36 | ||
| 20 | Vic::Vic(GPU& gpu_, std::shared_ptr<Nvdec> nvdec_processor_) | 37 | Vic::Vic(GPU& gpu_, std::shared_ptr<Nvdec> nvdec_processor_) |