summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util/u_math.h
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2015-02-27 12:49:29 -0700
committerBrian Paul <[email protected]>2015-02-27 15:20:15 -0700
commitb14cec0b8e98195679eab5afbdba3bb47badccf2 (patch)
tree19cafc0b9d029f033e449891457601535c1e4788 /src/gallium/auxiliary/util/u_math.h
parent53295bebc883c5b90b4b3a2612d7cacabc94fd1b (diff)
gallium/util: fix 'statement with no effect' warning
Reviewed-by: José Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/util/u_math.h')
-rw-r--r--src/gallium/auxiliary/util/u_math.h4
1 files changed, 2 insertions, 2 deletions
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;