git: d483782ecf67 - main - intpm: Remove write only variables, tag slvcnt unused since it's used for debugging

From: Warner Losh <imp_at_FreeBSD.org>
Date: Wed, 06 Apr 2022 03:42:58 UTC
The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=d483782ecf679ac15232ec4213cebf916759eee4

commit d483782ecf679ac15232ec4213cebf916759eee4
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2022-04-06 02:00:42 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2022-04-06 03:42:05 +0000

    intpm: Remove write only variables, tag slvcnt unused since it's used for debugging
    
    Sponsored by:           Netflix
---
 sys/dev/intpm/intpm.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sys/dev/intpm/intpm.c b/sys/dev/intpm/intpm.c
index a394a8a0be73..e14f3b8f4eed 100644
--- a/sys/dev/intpm/intpm.c
+++ b/sys/dev/intpm/intpm.c
@@ -468,7 +468,7 @@ intsmb_slvintr(struct intsmb_softc *sc)
 static void
 intsmb_alrintr(struct intsmb_softc *sc)
 {
-	int slvcnt;
+	int slvcnt __unused;
 #ifdef ENABLE_ALART
 	int error;
 	uint8_t addr;
@@ -840,7 +840,7 @@ intsmb_bread(device_t dev, u_char slave, char cmd, u_char *count, char *buf)
 {
 	struct intsmb_softc *sc = device_get_softc(dev);
 	int error, i;
-	u_char data, nread;
+	u_char nread;
 
 	INTSMB_LOCK(sc);
 	error = intsmb_free(sc);
@@ -861,7 +861,7 @@ intsmb_bread(device_t dev, u_char slave, char cmd, u_char *count, char *buf)
 		if (nread != 0 && nread <= SMBBLOCKTRANS_MAX) {
 			*count = nread;
 			for (i = 0; i < nread; i++)
-				data = bus_read_1(sc->io_res, PIIX4_SMBBLKDAT);
+				bus_read_1(sc->io_res, PIIX4_SMBBLKDAT);
 		} else
 			error = SMB_EBUSERR;
 	}