git: 2ccf971ace0b - main - iflib: Cast the result of iflib_netmap_txq_init() to void.

John Baldwin jhb at FreeBSD.org
Fri Feb 19 20:53:36 UTC 2021


The branch main has been updated by jhb:

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

commit 2ccf971ace0bf23a9b27ec886a7f013c47661052
Author:     John Baldwin <jhb at FreeBSD.org>
AuthorDate: 2021-02-19 20:52:05 +0000
Commit:     John Baldwin <jhb at FreeBSD.org>
CommitDate: 2021-02-19 20:52:53 +0000

    iflib: Cast the result of iflib_netmap_txq_init() to void.
    
    This fixes a warning from GCC for kernels without netmap since the
    return value is never used.
    
    Reviewed by:    vmaffione, erj
    Differential Revision:  https://reviews.freebsd.org/D28598
---
 sys/net/iflib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/net/iflib.c b/sys/net/iflib.c
index a33ddbe5b8ae..6312499feac8 100644
--- a/sys/net/iflib.c
+++ b/sys/net/iflib.c
@@ -2454,7 +2454,7 @@ iflib_init_locked(if_ctx_t ctx)
 		callout_stop(&txq->ift_netmap_timer);
 #endif /* DEV_NETMAP */
 		CALLOUT_UNLOCK(txq);
-		iflib_netmap_txq_init(ctx, txq);
+		(void)iflib_netmap_txq_init(ctx, txq);
 	}
 
 	/*


More information about the dev-commits-src-all mailing list