laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35472?usp=email )
Change subject: bitvec: bitvec_to_string_r(): drop unused variable ......................................................................
bitvec: bitvec_to_string_r(): drop unused variable
bitvec.c:543:14: warning: variable 'pos' set but not used [-Wunused-but-set-variable] unsigned i, pos = 0;
Change-Id: I17df6f9263bee06676309c00837f12220803c814 --- M src/core/bitvec.c 1 file changed, 13 insertions(+), 3 deletions(-)
Approvals: pespin: Looks good to me, approved Jenkins Builder: Verified
diff --git a/src/core/bitvec.c b/src/core/bitvec.c index 38ea1bb..ac702b9 100644 --- a/src/core/bitvec.c +++ b/src/core/bitvec.c @@ -540,13 +540,11 @@ */ void bitvec_to_string_r(const struct bitvec *bv, char *str) { - unsigned i, pos = 0; char *cur = str; - for (i = 0; i < bv->cur_bit; i++) { + for (unsigned int i = 0; i < bv->cur_bit; i++) { if (0 == i % 8) *cur++ = ' '; *cur++ = bit_value_to_char(bitvec_get_bit_pos(bv, i)); - pos++; } *cur = 0; }