From fad3bab2d030681801a11b17d9ae4a5277bfe90c Mon Sep 17 00:00:00 2001 From: Misa Date: Wed, 13 Jan 2021 19:39:50 -0800 Subject: [PATCH] Initialize bcol and bcol2 in Graphics::drawbackground() While compiling in release mode, GCC warns about these two potentially being used uninitialized further down. The only way this could happen is if the case-switches below didn't match up with a case, which would require the game to be in an invalid state (and have invalid values for rcol and spcol), but it's better to be safe than sorry. --- desktop_version/src/Graphics.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktop_version/src/Graphics.cpp b/desktop_version/src/Graphics.cpp index 982be25b..6cad1f7d 100644 --- a/desktop_version/src/Graphics.cpp +++ b/desktop_version/src/Graphics.cpp @@ -1932,7 +1932,7 @@ void Graphics::drawbackground( int t ) break; case 2: { - int bcol, bcol2; + int bcol = 0, bcol2 = 0; //Lab switch(rcol)