From ab9946d8effc89bc534fb3aeb59ff1810814cefd Mon Sep 17 00:00:00 2001 From: Janneke Nieuwenhuizen Date: Sun, 2 Jul 2023 21:10:35 +0200 Subject: [PATCH] lib/tests: Initialize local variable. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reuported by Andrius Štikonas via IRC. * lib/tests/assert/50-assert.c (main): Initialize local f. * lib/tests/scaffold/21-char-array.c (main): Likewise. --- lib/tests/assert/50-assert.c | 4 ++-- lib/tests/scaffold/21-char-array.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/tests/assert/50-assert.c b/lib/tests/assert/50-assert.c index 6702ab10..21037999 100644 --- a/lib/tests/assert/50-assert.c +++ b/lib/tests/assert/50-assert.c @@ -1,6 +1,6 @@ /* -*-comment-start: "//";comment-end:""-*- * GNU Mes --- Maxwell Equations of Software - * Copyright © 2017 Jan (janneke) Nieuwenhuizen + * Copyright © 2017,2023 Jan (janneke) Nieuwenhuizen * * This file is part of GNU Mes. * @@ -25,7 +25,7 @@ int main () { - int f; + int f = 0; puts ("\n"); puts ("t: assert (1) ?\n"); diff --git a/lib/tests/scaffold/21-char-array.c b/lib/tests/scaffold/21-char-array.c index a3bf9eef..2db15eb2 100644 --- a/lib/tests/scaffold/21-char-array.c +++ b/lib/tests/scaffold/21-char-array.c @@ -1,6 +1,6 @@ /* -*-comment-start: "//";comment-end:""-*- * GNU Mes --- Maxwell Equations of Software - * Copyright © 2017,2018 Jan (janneke) Nieuwenhuizen + * Copyright © 2017,2018,2023 Jan (janneke) Nieuwenhuizen * * This file is part of GNU Mes. * @@ -24,7 +24,7 @@ main () char *s = "mes"; if (!s[0]) return 1; - int f; + int f = 0; int v = 3; if (!s[f]) return 2;