summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorrin <rin@NetBSD.org>2023-06-19 03:03:11 +0000
committerrin <rin@NetBSD.org>2023-06-19 03:03:11 +0000
commit1780d1f07e6befed43a53fb0dc70973b21d746ce (patch)
tree7cede0e5034a74f914e60f8fa9047520bbb48959 /usr.sbin
parent69ee0630d23fc412f7d4b2d06632f2a4d7c23e74 (diff)
Silence wrong maybe-uninitialized raised by GCC/x86_64 10.4.0 -Os.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/envstat/envstat.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/envstat/envstat.c b/usr.sbin/envstat/envstat.c
index 022950b6e94..4542feecd32 100644
--- a/usr.sbin/envstat/envstat.c
+++ b/usr.sbin/envstat/envstat.c
@@ -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);