summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Yuri Kunde Schlesner2015-09-10 01:21:58 -0300
committerGravatar Yuri Kunde Schlesner2015-09-10 01:21:58 -0300
commit248b2993e866d66632a7fc7148a2faed3c3c6416 (patch)
treebfecb17936ea2936c65ae758545ed6dfc47e5fe0 /src
parentMerge pull request #1132 from lioncash/unimpl (diff)
parenty2r: Give local variables an initial value (diff)
downloadyuzu-248b2993e866d66632a7fc7148a2faed3c3c6416.tar.gz
yuzu-248b2993e866d66632a7fc7148a2faed3c3c6416.tar.xz
yuzu-248b2993e866d66632a7fc7148a2faed3c3c6416.zip
Merge pull request #1131 from lioncash/uninit
y2r: Give local variables an initial value
Diffstat (limited to 'src')
-rw-r--r--src/core/hw/y2r.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/core/hw/y2r.cpp b/src/core/hw/y2r.cpp
index 082a4db82..15f96ced8 100644
--- a/src/core/hw/y2r.cpp
+++ b/src/core/hw/y2r.cpp
@@ -33,7 +33,9 @@ static void ConvertYUVToRGB(InputFormat input_format,
33 33
34 for (unsigned int y = 0; y < height; ++y) { 34 for (unsigned int y = 0; y < height; ++y) {
35 for (unsigned int x = 0; x < width; ++x) { 35 for (unsigned int x = 0; x < width; ++x) {
36 s32 Y, U, V; 36 s32 Y = 0;
37 s32 U = 0;
38 s32 V = 0;
37 switch (input_format) { 39 switch (input_format) {
38 case InputFormat::YUV422_Indiv8: 40 case InputFormat::YUV422_Indiv8:
39 case InputFormat::YUV422_Indiv16: 41 case InputFormat::YUV422_Indiv16:
@@ -269,7 +271,7 @@ void PerformConversion(ConversionConfiguration& cvt) {
269 271
270 // LUT used to remap writes to a tile. Used to allow linear or swizzled output without 272 // LUT used to remap writes to a tile. Used to allow linear or swizzled output without
271 // requiring two different code paths. 273 // requiring two different code paths.
272 const u8* tile_remap; 274 const u8* tile_remap = nullptr;
273 switch (cvt.block_alignment) { 275 switch (cvt.block_alignment) {
274 case BlockAlignment::Linear: 276 case BlockAlignment::Linear:
275 tile_remap = linear_lut; break; 277 tile_remap = linear_lut; break;
@@ -323,7 +325,8 @@ void PerformConversion(ConversionConfiguration& cvt) {
323 u32* output_buffer = reinterpret_cast<u32*>(data_buffer.get()); 325 u32* output_buffer = reinterpret_cast<u32*>(data_buffer.get());
324 326
325 for (int i = 0; i < num_tiles; ++i) { 327 for (int i = 0; i < num_tiles; ++i) {
326 int image_strip_width, output_stride; 328 int image_strip_width = 0;
329 int output_stride = 0;
327 330
328 switch (cvt.rotation) { 331 switch (cvt.rotation) {
329 case Rotation::None: 332 case Rotation::None: