avoid uninitialised variable warnings (likely incorrect ones.)

cry wolved by GCC 12.
This commit is contained in:
mrg 2023-08-11 07:05:39 +00:00
parent d02cd0c587
commit 6ed8189e16
4 changed files with 11 additions and 11 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: rmixl_fmn.c,v 1.4 2011/09/27 01:02:34 jym Exp $ */
/* $NetBSD: rmixl_fmn.c,v 1.5 2023/08/11 07:05:39 mrg Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
* All rights reserved.
@ -896,7 +896,7 @@ static int
rmixl_fmn_msg_recv_subr(u_int bucket, rmixl_fmn_rxmsg_t *rxmsg)
{
fmn_t *fmnp;
uint32_t msg_status;
uint32_t msg_status = 0 /* XXXGCC12 */;
int rv;
fmnp = fmn_lookup(curcpu()->ci_cpuid);

View File

@ -1,4 +1,4 @@
/* $NetBSD: rtsx.c,v 1.6 2021/08/07 16:19:12 thorpej Exp $ */
/* $NetBSD: rtsx.c,v 1.7 2023/08/11 07:05:39 mrg Exp $ */
/* $OpenBSD: rtsx.c,v 1.10 2014/08/19 17:55:03 phessler Exp $ */
/*
@ -23,7 +23,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: rtsx.c,v 1.6 2021/08/07 16:19:12 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: rtsx.c,v 1.7 2023/08/11 07:05:39 mrg Exp $");
#include <sys/param.h>
#include <sys/device.h>
@ -935,7 +935,7 @@ static int
rtsx_read(struct rtsx_softc *sc, uint16_t addr, uint8_t *val)
{
int tries = 1024;
uint32_t reg;
uint32_t reg = 0 /* XXXGCC12 */;
WRITE4(sc, RTSX_HAIMR, RTSX_HAIMR_BUSY |
(uint32_t)((addr & 0x3FFF) << 16));

View File

@ -1,4 +1,4 @@
/* $NetBSD: strlist.c,v 1.2 2021/01/23 19:41:16 thorpej Exp $ */
/* $NetBSD: strlist.c,v 1.3 2023/08/11 07:05:39 mrg Exp $ */
/*-
* Copyright (c) 2021 The NetBSD Foundation, Inc.
@ -258,7 +258,7 @@ strlist_match(const char * const sl, size_t const slsize,
const char * const str)
{
unsigned int count;
int idx;
int idx = 0 /* XXXGCC 12 */;
if (strlist_match_internal(sl, slsize, str, &idx, &count,
match_strcmp)) {
@ -279,7 +279,7 @@ strlist_pmatch(const char * const sl, size_t const slsize,
const char * const pattern)
{
unsigned int count;
int idx;
int idx = 0; /* XXXGCC12 */
if (strlist_match_internal(sl, slsize, pattern, &idx, &count,
match_pmatch)) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: sunlabel.c,v 1.25 2017/05/04 16:29:08 sevan Exp $ */
/* $NetBSD: sunlabel.c,v 1.26 2023/08/11 07:05:39 mrg Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@ -35,7 +35,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
__RCSID("$NetBSD: sunlabel.c,v 1.25 2017/05/04 16:29:08 sevan Exp $");
__RCSID("$NetBSD: sunlabel.c,v 1.26 2023/08/11 07:05:39 mrg Exp $");
#endif
#include <stdio.h>
@ -1018,7 +1018,7 @@ print_part(int all)
int i, j, k, n, r, c;
size_t ncols;
uint32_t edges[2 * NPART];
int ce[2 * NPART];
int ce[2 * NPART] = {0}; /* XXXGCC12 */
int row[NPART];
unsigned char table[2 * NPART][NPART];
char *line;