lib/tests: Initialize local variable.

Reuported by Andrius Štikonas <andrius@stikonas.eu> via IRC.

* lib/tests/assert/50-assert.c (main): Initialize local f.
* lib/tests/scaffold/21-char-array.c (main): Likewise.
This commit is contained in:
Janneke Nieuwenhuizen 2023-07-02 21:10:35 +02:00
parent 00720c8d5f
commit ab9946d8ef
2 changed files with 4 additions and 4 deletions

View file

@ -1,6 +1,6 @@
/* -*-comment-start: "//";comment-end:""-*- /* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software * GNU Mes --- Maxwell Equations of Software
* Copyright © 2017 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> * Copyright © 2017,2023 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* *
* This file is part of GNU Mes. * This file is part of GNU Mes.
* *
@ -25,7 +25,7 @@
int int
main () main ()
{ {
int f; int f = 0;
puts ("\n"); puts ("\n");
puts ("t: assert (1) ?\n"); puts ("t: assert (1) ?\n");

View file

@ -1,6 +1,6 @@
/* -*-comment-start: "//";comment-end:""-*- /* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software * GNU Mes --- Maxwell Equations of Software
* Copyright © 2017,2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> * Copyright © 2017,2018,2023 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* *
* This file is part of GNU Mes. * This file is part of GNU Mes.
* *
@ -24,7 +24,7 @@ main ()
char *s = "mes"; char *s = "mes";
if (!s[0]) if (!s[0])
return 1; return 1;
int f; int f = 0;
int v = 3; int v = 3;
if (!s[f]) if (!s[f])
return 2; return 2;