gallium/util: fix 'statement with no effect' warning

Reviewed-by: José Fonseca <jfonseca@vmware.com>
This commit is contained in:
Brian Paul
2015-02-27 12:49:29 -07:00
parent 53295bebc8
commit b14cec0b8e
+2 -2
View File
@@ -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;