laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/26813 )
Change subject: bits.c: Fix -Wsign-compare warnings ......................................................................
bits.c: Fix -Wsign-compare warnings
Change-Id: I6a2e3e9c8743b229633204562712fda1433a78ec --- M src/bits.c 1 file changed, 3 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/13/26813/1
diff --git a/src/bits.c b/src/bits.c index 4b413a3..c1c3f90 100644 --- a/src/bits.c +++ b/src/bits.c @@ -188,7 +188,7 @@ const ubit_t *in, unsigned int in_ofs, unsigned int num_bits, int lsb_mode) { - int i, op, bn; + unsigned int i, op, bn; for (i=0; i<num_bits; i++) { op = out_ofs + i; bn = lsb_mode ? (op&7) : (7-(op&7)); @@ -213,7 +213,7 @@ const pbit_t *in, unsigned int in_ofs, unsigned int num_bits, int lsb_mode) { - int i, ip, bn; + unsigned int i, ip, bn; for (i=0; i<num_bits; i++) { ip = in_ofs + i; bn = lsb_mode ? (ip&7) : (7-(ip&7)); @@ -304,7 +304,7 @@ */ void osmo_revbytebits_buf(uint8_t *buf, int len) { - unsigned int i; + int i;
for (i = 0; i < len; i++) buf[i] = flip_table[buf[i]];
tnt has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/26813 )
Change subject: bits.c: Fix -Wsign-compare warnings ......................................................................
Patch Set 1: Code-Review+1
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/26813 )
Change subject: bits.c: Fix -Wsign-compare warnings ......................................................................
Patch Set 1: Code-Review+2
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/26813 )
Change subject: bits.c: Fix -Wsign-compare warnings ......................................................................
bits.c: Fix -Wsign-compare warnings
Change-Id: I6a2e3e9c8743b229633204562712fda1433a78ec --- M src/bits.c 1 file changed, 3 insertions(+), 3 deletions(-)
Approvals: Jenkins Builder: Verified tnt: Looks good to me, but someone else must approve pespin: Looks good to me, approved
diff --git a/src/bits.c b/src/bits.c index 4b413a3..c1c3f90 100644 --- a/src/bits.c +++ b/src/bits.c @@ -188,7 +188,7 @@ const ubit_t *in, unsigned int in_ofs, unsigned int num_bits, int lsb_mode) { - int i, op, bn; + unsigned int i, op, bn; for (i=0; i<num_bits; i++) { op = out_ofs + i; bn = lsb_mode ? (op&7) : (7-(op&7)); @@ -213,7 +213,7 @@ const pbit_t *in, unsigned int in_ofs, unsigned int num_bits, int lsb_mode) { - int i, ip, bn; + unsigned int i, ip, bn; for (i=0; i<num_bits; i++) { ip = in_ofs + i; bn = lsb_mode ? (ip&7) : (7-(ip&7)); @@ -304,7 +304,7 @@ */ void osmo_revbytebits_buf(uint8_t *buf, int len) { - unsigned int i; + int i;
for (i = 0; i < len; i++) buf[i] = flip_table[buf[i]];