From: Brian Paul Date: Fri, 27 Feb 2015 19:49:29 +0000 (-0700) Subject: gallium/util: fix 'statement with no effect' warning X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b14cec0b8e98195679eab5afbdba3bb47badccf2;p=mesa.git gallium/util: fix 'statement with no effect' warning Reviewed-by: José Fonseca --- diff --git a/src/gallium/auxiliary/util/u_math.h b/src/gallium/auxiliary/util/u_math.h index 959f76e1dd8..5400fcead59 100644 --- a/src/gallium/auxiliary/util/u_math.h +++ b/src/gallium/auxiliary/util/u_math.h @@ -581,8 +581,8 @@ util_bitcount(unsigned n) * Requires only one iteration per set bit, instead of * one iteration per bit less than highest set bit. */ - unsigned bits = 0; - for (bits; n; bits++) { + unsigned bits; + for (bits = 0; n; bits++) { n &= n - 1; } return bits;