Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/envstat Silence wrong maybe-uninitialized raised by...



details:   https://anonhg.NetBSD.org/src/rev/858ede751642
branches:  trunk
changeset: 376453:858ede751642
user:      rin <rin%NetBSD.org@localhost>
date:      Mon Jun 19 03:03:11 2023 +0000

description:
Silence wrong maybe-uninitialized raised by GCC/x86_64 10.4.0 -Os.

diffstat:

 usr.sbin/envstat/envstat.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r e4a53bc93ab7 -r 858ede751642 usr.sbin/envstat/envstat.c
--- a/usr.sbin/envstat/envstat.c        Sun Jun 18 22:18:13 2023 +0000
+++ b/usr.sbin/envstat/envstat.c        Mon Jun 19 03:03:11 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: envstat.c,v 1.103 2022/11/21 21:24:02 brad Exp $ */
+/* $NetBSD: envstat.c,v 1.104 2023/06/19 03:03:11 rin Exp $ */
 
 /*-
  * Copyright (c) 2007, 2008 Juan Romero Pardines.
@@ -27,7 +27,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: envstat.c,v 1.103 2022/11/21 21:24:02 brad Exp $");
+__RCSID("$NetBSD: envstat.c,v 1.104 2023/06/19 03:03:11 rin Exp $");
 #endif /* not lint */
 
 #include <stdio.h>
@@ -236,7 +236,8 @@ int main(int argc, char **argv)
                                        err(EXIT_FAILURE, "add_sensors");
                        }
                        if (sensors) {
-                               char *dvstring, *sstring, *p, *last, *s;
+                               char *sstring, *p, *last, *s;
+                               char *dvstring = NULL; /* XXXGCC */
                                unsigned count = 0;
 
                                s = strdup(sensors);



Home | Main Index | Thread Index | Old Index