aboutsummaryrefslogtreecommitdiffstats
path: root/src/bitvector.h
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-07-28 16:04:35 +0200
committerIvan Kluchnikov <kluchnikovi@gmail.com>2013-08-02 13:39:13 +0400
commit939bfaefecc7e7694c130adbfbefa7242de528ba (patch)
treeabf2cc63c56e8304dce37d2d961bb5c4846856be /src/bitvector.h
parentf14ddb7830e873c759a26d58da57467a74cc44b9 (diff)
bitvector: Address compiler warnings about unsigned/signed
Fixes: bitvector.cpp: In function 'int bitvec_pack(bitvec*, uint8_t*)': bitvector.cpp:53:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] bitvector.cpp: In function 'int bitvec_unpack(bitvec*, uint8_t*)': bitvector.cpp:63:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] bitvector.cpp: In function 'uint64_t bitvec_read_field(bitvec*, unsigned int&, unsigned int)': bitvector.cpp:91:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] bitvector.cpp: In function 'int bitvec_write_field(bitvec*, unsigned int&, uint64_t, unsigned int)': bitvector.cpp:108:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
Diffstat (limited to 'src/bitvector.h')
-rw-r--r--src/bitvector.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bitvector.h b/src/bitvector.h
index 7409d55..36bdbab 100644
--- a/src/bitvector.h
+++ b/src/bitvector.h
@@ -35,8 +35,8 @@ extern "C" {
struct bitvec *bitvec_alloc(unsigned size);
void bitvec_free(struct bitvec *bv);
int bitvec_unhex(struct bitvec *bv, const char* src);
-int bitvec_pack(struct bitvec *bv, uint8_t *buffer);
-int bitvec_unpack(struct bitvec *bv, uint8_t *buffer);
+unsigned int bitvec_pack(struct bitvec *bv, uint8_t *buffer);
+unsigned int bitvec_unpack(struct bitvec *bv, uint8_t *buffer);
uint64_t bitvec_read_field(struct bitvec *bv, unsigned& read_index, unsigned len);
int bitvec_write_field(struct bitvec *bv, unsigned& write_index, uint64_t val, unsigned len);