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

This commit is contained in:
rin 2023-06-19 03:03:11 +00:00
parent 567c8efbdb
commit 0517e95fd0
1 changed files with 4 additions and 3 deletions

View File

@ -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. * Copyright (c) 2007, 2008 Juan Romero Pardines.
@ -27,7 +27,7 @@
#include <sys/cdefs.h> #include <sys/cdefs.h>
#ifndef lint #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 */ #endif /* not lint */
#include <stdio.h> #include <stdio.h>
@ -236,7 +236,8 @@ int main(int argc, char **argv)
err(EXIT_FAILURE, "add_sensors"); err(EXIT_FAILURE, "add_sensors");
} }
if (sensors) { if (sensors) {
char *dvstring, *sstring, *p, *last, *s; char *sstring, *p, *last, *s;
char *dvstring = NULL; /* XXXGCC */
unsigned count = 0; unsigned count = 0;
s = strdup(sensors); s = strdup(sensors);