Module Name:    src
Committed By:   mrg
Date:           Fri Aug 11 07:05:39 UTC 2023

Modified Files:
        src/sys/arch/mips/rmi: rmixl_fmn.c
        src/sys/dev/ic: rtsx.c
        src/sys/lib/libkern: strlist.c
        src/usr.sbin/sunlabel: sunlabel.c

Log Message:
avoid uninitialised variable warnings (likely incorrect ones.)

cry wolved by GCC 12.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/mips/rmi/rmixl_fmn.c
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/ic/rtsx.c
cvs rdiff -u -r1.2 -r1.3 src/sys/lib/libkern/strlist.c
cvs rdiff -u -r1.25 -r1.26 src/usr.sbin/sunlabel/sunlabel.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/mips/rmi/rmixl_fmn.c
diff -u src/sys/arch/mips/rmi/rmixl_fmn.c:1.4 src/sys/arch/mips/rmi/rmixl_fmn.c:1.5
--- src/sys/arch/mips/rmi/rmixl_fmn.c:1.4	Tue Sep 27 01:02:34 2011
+++ src/sys/arch/mips/rmi/rmixl_fmn.c	Fri Aug 11 07:05:39 2023
@@ -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);

Index: src/sys/dev/ic/rtsx.c
diff -u src/sys/dev/ic/rtsx.c:1.6 src/sys/dev/ic/rtsx.c:1.7
--- src/sys/dev/ic/rtsx.c:1.6	Sat Aug  7 16:19:12 2021
+++ src/sys/dev/ic/rtsx.c	Fri Aug 11 07:05:39 2023
@@ -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));

Index: src/sys/lib/libkern/strlist.c
diff -u src/sys/lib/libkern/strlist.c:1.2 src/sys/lib/libkern/strlist.c:1.3
--- src/sys/lib/libkern/strlist.c:1.2	Sat Jan 23 19:41:16 2021
+++ src/sys/lib/libkern/strlist.c	Fri Aug 11 07:05:39 2023
@@ -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, siz
     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, si
     const char * const pattern)
 {
 	unsigned int count;
-	int idx;
+	int idx = 0; /* XXXGCC12 */
 
 	if (strlist_match_internal(sl, slsize, pattern, &idx, &count,
 				   match_pmatch)) {

Index: src/usr.sbin/sunlabel/sunlabel.c
diff -u src/usr.sbin/sunlabel/sunlabel.c:1.25 src/usr.sbin/sunlabel/sunlabel.c:1.26
--- src/usr.sbin/sunlabel/sunlabel.c:1.25	Thu May  4 16:29:08 2017
+++ src/usr.sbin/sunlabel/sunlabel.c	Fri Aug 11 07:05:39 2023
@@ -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;

Reply via email to