Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Dec 2019 20:15:17 +0000 (UTC)
From:      Ryan Libby <rlibby@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r355400 - head/sys/sys
Message-ID:  <201912042015.xB4KFHWX070820@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rlibby
Date: Wed Dec  4 20:15:17 2019
New Revision: 355400
URL: https://svnweb.freebsd.org/changeset/base/355400

Log:
  bistring: avoid gcc -Wsign-compare
  
  Appease gcc after after r355377, which broke gcc builds.
  
  Reviewed by:	dougm
  MFC with:	r355377
  Differential Revision:	https://reviews.freebsd.org/D22682

Modified:
  head/sys/sys/bitstring.h

Modified: head/sys/sys/bitstring.h
==============================================================================
--- head/sys/sys/bitstring.h	Wed Dec  4 19:46:48 2019	(r355399)
+++ head/sys/sys/bitstring.h	Wed Dec  4 20:15:17 2019	(r355400)
@@ -306,7 +306,7 @@ bit_ffs_area_at(bitstr_t *_bitstr, int _start, int _nb
 			while ((_test & (_test + 1)) != 0 && _b-- > 0)
 				_test |= _test >> (((_size - 1) >> _b) + 1) / 2;
 			/* Find the start of the first 0-area in _test. */
-			_offset = (~_test == 0) ? _BITSTR_BITS :
+			_offset = (~_test == 0) ? (int)_BITSTR_BITS :
 			    ffsl(~_test) - 1;
 			_value = (_curbitstr - _bitstr) * _BITSTR_BITS +
 			    _offset;
@@ -353,7 +353,7 @@ bit_ffc_area_at(bitstr_t *_bitstr, int _start, int _nb
 			while ((_test & (_test + 1)) != 0 && _b-- > 0)
 				_test |= _test >> (((_size - 1) >> _b) + 1) / 2;
 			/* Find the start of the first 0-area in _test. */
-			_offset = (~_test == 0) ? _BITSTR_BITS :
+			_offset = (~_test == 0) ? (int)_BITSTR_BITS :
 			    ffsl(~_test) - 1;
 			_value = (_curbitstr - _bitstr) * _BITSTR_BITS +
 			    _offset;



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