From 479d5c9c9ea31b5f44f124e053ac3eb260227ba3 Mon Sep 17 00:00:00 2001 From: Megamouse Date: Mon, 28 Sep 2026 22:22:05 +0200 Subject: [PATCH] cellVdec: fix some VS warnings --- rpcs3/Emu/Cell/Modules/cellVdec.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/rpcs3/Emu/Cell/Modules/cellVdec.cpp b/rpcs3/Emu/Cell/Modules/cellVdec.cpp index 33e7e29004..6ba5c73a1c 100644 --- a/rpcs3/Emu/Cell/Modules/cellVdec.cpp +++ b/rpcs3/Emu/Cell/Modules/cellVdec.cpp @@ -23,7 +23,6 @@ extern "C" #include "libavutil/imgutils.h" #include "libswscale/swscale.h" } -constexpr int averror_eof = AVERROR_EOF; // workaround for old-style-cast error #ifdef _MSC_VER #pragma warning(pop) #else @@ -50,6 +49,8 @@ constexpr int averror_eof = AVERROR_EOF; // workaround for old-style-cast error std::mutex g_mutex_avcodec_open2; +constexpr int averror_eof = AVERROR_EOF; // workaround for old-style-cast error + LOG_CHANNEL(cellVdec); template<> @@ -1256,7 +1257,7 @@ error_code cellVdecQueryAttrEx(ppu_thread& ppu, vm::cptr type, v return CELL_VDEC_ERROR_ARG; } - VdecDecoderAttr decoder_attr; + VdecDecoderAttr decoder_attr {}; if (get_decoder_specific_ops(type->codecType).query_attr(ppu, decoder_attr, type->profileLevel, type->codecSpecificInfo ? type->codecSpecificInfo.get_ptr() : nullptr) != CELL_OK) { @@ -1430,7 +1431,7 @@ static error_code vdecOpen(ppu_thread& ppu, T type, U res, vm::cptr spec = type->codecSpecificInfo ? type->codecSpecificInfo.get_ptr() : nullptr; } - VdecDecoderAttr attr; + VdecDecoderAttr attr {}; const error_code err = get_decoder_specific_ops(type->codecType).query_attr(ppu, attr, type->profileLevel, spec); if (err != CELL_OK) {