Module Name: src
Committed By: mrg
Date: Mon Sep 4 21:54:41 UTC 2023
Modified Files:
src/sys/dev/ic: tulip.c
Log Message:
mask a value with the array size mask to avoid a GCC 12 warning.
i'm fairly sure this can't actually happen, but it likely avoids
any potential bug without real issue.
To generate a diff of this commit:
cvs rdiff -u -r1.208 -r1.209 src/sys/dev/ic/tulip.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/dev/ic/tulip.c
diff -u src/sys/dev/ic/tulip.c:1.208 src/sys/dev/ic/tulip.c:1.209
--- src/sys/dev/ic/tulip.c:1.208 Mon Aug 1 10:30:28 2022
+++ src/sys/dev/ic/tulip.c Mon Sep 4 21:54:41 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: tulip.c,v 1.208 2022/08/01 10:30:28 kre Exp $ */
+/* $NetBSD: tulip.c,v 1.209 2023/09/04 21:54:41 mrg Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2002 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tulip.c,v 1.208 2022/08/01 10:30:28 kre Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tulip.c,v 1.209 2023/09/04 21:54:41 mrg Exp $");
#include <sys/param.h>
@@ -2751,7 +2751,7 @@ tlp_filter_setup(struct tulip_softc *sc)
txs->txs_mbuf = NULL;
nexttx = sc->sc_txnext;
- txd = &sc->sc_txdescs[nexttx];
+ txd = &sc->sc_txdescs[nexttx & TULIP_NTXDESC_MASK /* XXXGCC12 */];
txd->td_status = 0;
txd->td_bufaddr1 = htole32(TULIP_CDSPADDR(sc));
txd->td_ctl = htole32((TULIP_SETUP_PACKET_LEN << TDCTL_SIZE1_SHIFT) |