Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Nov 2018 06:44:09 +0000 (UTC)
From:      Andrew Rybchenko <arybchik@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r341197 - head/sys/dev/sfxge/common
Message-ID:  <201811290644.wAT6i90s025257@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: arybchik
Date: Thu Nov 29 06:44:09 2018
New Revision: 341197
URL: https://svnweb.freebsd.org/changeset/base/341197

Log:
  sfxge(4): fix comparison always true warning
  
  Loopback type used as bit index has efx_loopback_type_t type
  which is enum. clang complains that it is always true when it
  is compared with qword (64 bit) bits number boundary.
  
  Sponsored by:   Solarflare Communications, Inc.
  MFC after:      1 week
  Differential Revision:  https://reviews.freebsd.org/D18228

Modified:
  head/sys/dev/sfxge/common/efx_port.c

Modified: head/sys/dev/sfxge/common/efx_port.c
==============================================================================
--- head/sys/dev/sfxge/common/efx_port.c	Thu Nov 29 06:43:57 2018	(r341196)
+++ head/sys/dev/sfxge/common/efx_port.c	Thu Nov 29 06:44:09 2018	(r341197)
@@ -149,7 +149,7 @@ efx_port_loopback_set(
 	EFSYS_ASSERT(link_mode < EFX_LINK_NMODES);
 
 	if (EFX_TEST_QWORD_BIT(encp->enc_loopback_types[link_mode],
-		loopback_type) == 0) {
+		(int)loopback_type) == 0) {
 		rc = ENOTSUP;
 		goto fail1;
 	}



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