Skip to content

Commit

Permalink
[PATCH] x86: handle -Wsign-compare in bitops
Browse files Browse the repository at this point in the history
Make i386's find_first_bit() use an unsigned integer as a counter to avoid
getting warnings when -Wsign-compare is given.

Signed-Off-By: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
David Howells authored and Linus Torvalds committed Jan 6, 2006
1 parent 2684927 commit d89c145
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/asm-i386/bitops.h
Original file line number Diff line number Diff line change
Expand Up @@ -332,9 +332,9 @@ static inline unsigned long __ffs(unsigned long word)
* Returns the bit-number of the first set bit, not the number of the byte
* containing a bit.
*/
static inline int find_first_bit(const unsigned long *addr, unsigned size)
static inline unsigned find_first_bit(const unsigned long *addr, unsigned size)
{
int x = 0;
unsigned x = 0;

while (x < size) {
unsigned long val = *addr++;
Expand Down

0 comments on commit d89c145

Please sign in to comment.