fixup/test compiler warnings

This commit is contained in:
graham sanderson
2021-05-24 12:17:14 -05:00
committed by Graham Sanderson
parent 4f64f3af80
commit 7e4e3290d5
10 changed files with 23 additions and 8 deletions

View File

@@ -37,7 +37,7 @@ int32_t fibonacci(int32_t n) {
if (n == 0) return 0;
if (n == 1) return 1;
int n1 = 0, n2 = 1, n3;
int n1 = 0, n2 = 1, n3 = 0;
for (int i = 2; i <= n; i++) {
n3 = n1 + n2;

View File

@@ -50,7 +50,7 @@ int32_t fibonacci(int32_t n) {
if (n == 0) return 0;
if (n == 1) return 1;
int n1 = 0, n2 = 1, n3;
int n1 = 0, n2 = 1, n3 = 0;
for (int i = 2; i <= n; i++) {
n3 = n1 + n2;