From f9db5b3863c389fbc0897754553c568b2a08798e Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Thu, 4 Apr 2019 14:36:58 +0200 Subject: [PATCH] fixed some uninitialized variable warnings --- reg3.cpp | 4 ++-- shmup.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/reg3.cpp b/reg3.cpp index 70c91760..cdef6bd9 100644 --- a/reg3.cpp +++ b/reg3.cpp @@ -400,7 +400,7 @@ namespace reg3 { if(S7 == 12) { // Emerald in 534 cell *a = gamestart(); - cell *b; + cell *b = a; for(cell *c: allcells()) if(hr::celldistance(a, c) == 5) { b = c; @@ -442,7 +442,7 @@ namespace reg3 { if(ok) nwi.insert(i); } - int gpow; + int gpow = 0; for(int i: nwi) { int pw = 1; diff --git a/shmup.cpp b/shmup.cpp index 9af1c3b1..dcad7571 100644 --- a/shmup.cpp +++ b/shmup.cpp @@ -1008,7 +1008,7 @@ struct horo_distance { a = abs(binary::horo_level(ih1)); } else - b = intval(h1, tC0(ggmatrix(c))); + a = 0, b = intval(h1, tC0(ggmatrix(c))); } bool operator < (const horo_distance z) { if(binarytiling) {