git: if_txp: Fix -Waddress warning from GCC 12.5

Aaron LI aly at crater.dragonflybsd.org
Tue Oct 13 23:15:10 PDT 2026


commit c7ab6e8ea7f42e4312eb5592a4750ab0a49640a0
Author: Aaron LI <aly at aaronly.me>
Date:   Wed Oct 14 13:23:10 2026 +0800

    if_txp: Fix -Waddress warning from GCC 12.5
    
    Remove the dead condition to fix the following '-Waddress' warning:
    ```
    /usr/src/sys/dev/netif/txp/if_txp.c: In function 'txp_rxring_empty':
    /usr/src/sys/dev/netif/txp/if_txp.c:1082:39: warning: the comparison will always evaluate as 'false' for the pointer operand in 'sc->sc_rxbufs + (sizetype)((long unsigned int)i * 16)' must not be NULL [-Waddress]
     1082 |                 if (&sc->sc_rxbufs[i] == NULL)
          |                                       ^~
    ```

Summary of changes:
 sys/dev/netif/txp/if_txp.c | 2 --
 1 file changed, 2 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/c7ab6e8ea7f42e4312eb5592a4750ab0a49640a0


-- 
DragonFly BSD source repository


More information about the Commits mailing list