tests: Fix a couple of compile warnings
This commit is contained in:
@@ -58,7 +58,8 @@ static inline int bit_run_count(char* b, int from, int len) {
|
|||||||
;
|
;
|
||||||
|
|
||||||
/* FIXME: debug this later */
|
/* FIXME: debug this later */
|
||||||
/*for (; (from+count) % 64 != 0 && len > 0; len--)
|
/*
|
||||||
|
for (; (from+count) % 64 != 0 && len > 0; len--)
|
||||||
if (bit_has_value(b, from+count, first_value))
|
if (bit_has_value(b, from+count, first_value))
|
||||||
count++;
|
count++;
|
||||||
else
|
else
|
||||||
@@ -71,8 +72,8 @@ static inline int bit_run_count(char* b, int from, int len) {
|
|||||||
}
|
}
|
||||||
for (; len > 0; len--)
|
for (; len > 0; len--)
|
||||||
if (bit_is_set(b, from+count))
|
if (bit_is_set(b, from+count))
|
||||||
count++;*/
|
count++;
|
||||||
|
*/
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
#include "bitset.h"
|
#include "bitset.h"
|
||||||
|
|
||||||
#define assert_bitset_is( map, val ) { \
|
#define assert_bitset_is( map, val ) {\
|
||||||
uint64_t *num = map->bits; \
|
uint64_t *num = (uint64_t*) map->bits; \
|
||||||
ck_assert_int_eq( val, *num ); \
|
ck_assert_int_eq( val, *num ); \
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -181,7 +181,7 @@ START_TEST( test_bitset_run_count )
|
|||||||
struct bitset_mapping* map = bitset_alloc( 64, 1 );
|
struct bitset_mapping* map = bitset_alloc( 64, 1 );
|
||||||
uint64_t run;
|
uint64_t run;
|
||||||
|
|
||||||
assert_bitset_is( map, 0x0000000000000000 );
|
assert_bitset_is( map, 0x0000000000000000 );
|
||||||
|
|
||||||
bitset_set_range( map, 0, 32 );
|
bitset_set_range( map, 0, 32 );
|
||||||
assert_bitset_is( map, 0x00000000ffffffff );
|
assert_bitset_is( map, 0x00000000ffffffff );
|
||||||
|
Reference in New Issue
Block a user