Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove unused variables (spotted with clang --analyze)

  • Loading branch information...
commit 9992afac78efaa815ac7e23a326419613ca8aaa9 1 parent c46d75b
@jbergstroem jbergstroem authored
Showing with 1 addition and 3 deletions.
  1. +0 −1  src/bitset.c
  2. +1 −2  test/test.c
View
1  src/bitset.c
@@ -474,7 +474,6 @@ bitset *bitset_new_bits(unsigned length, bitset_offset *bits) {
}
div = bits[i-2] / BITSET_LITERAL_LENGTH;
- rem = bits[i-2] % BITSET_LITERAL_LENGTH;
if (div == next_div) {
b->words[pos] |= BITSET_CREATE_LITERAL(next_rem);
View
3  test/test.c
@@ -492,9 +492,8 @@ void test_suite_stress() {
for (unsigned i = 0; i < num; i++) {
test_bool("Checking stress test bits were set", true, bitset_get(b, bits[i]));
}
- volatile unsigned j = 0;
for (unsigned i = 0; i < 86400; i++) {
- j = bitset_count(b);
+ bitset_count(b);
}
free(bits);
bitset_free(b);
Please sign in to comment.
Something went wrong with that request. Please try again.