Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Jul 2022 18:47:39 GMT
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 08329b98ab2e - stable/13 - Fix unused variable warning in sfxge's ef10_tx.c
Message-ID:  <202207291847.26TIldo5024399@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by dim:

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

commit 08329b98ab2e7191b4e0e9926bff050c5fb4e962
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2022-07-26 13:17:05 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2022-07-29 18:30:00 +0000

    Fix unused variable warning in sfxge's ef10_tx.c
    
    With clang 15, the following -Werror warning is produced:
    
        sys/dev/sfxge/common/ef10_tx.c:345:15: error: variable 'eqp' set but not used [-Werror,-Wunused-but-set-variable]
                efx_qword_t *eqp;
                             ^
    
    The 'eqp' variable is passed as an argument to the EFSYS_BAR_WC_WRITEQ()
    macro, but currently this macro ignores the argument, similar to its
    other _esbp argument. Silence the warning by casting the _eqp argument
    to void in the macro.
    
    MFC after:      3 days
    
    (cherry picked from commit a79731b9453320af6fcf5ec16fa5de900dadbce8)
---
 sys/dev/sfxge/common/efsys.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sys/dev/sfxge/common/efsys.h b/sys/dev/sfxge/common/efsys.h
index 37f3deeb2fbc..1ba130c96755 100644
--- a/sys/dev/sfxge/common/efsys.h
+++ b/sys/dev/sfxge/common/efsys.h
@@ -846,6 +846,7 @@ typedef struct efsys_bar_s {
 		    ("not power of 2 aligned"));			\
 									\
 		(void) (_esbp);						\
+		(void) (_eqp);						\
 									\
 		/* FIXME: Perform a 64-bit write */			\
 		KASSERT(0, ("not implemented"));			\



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202207291847.26TIldo5024399>