laforge has uploaded this change for review.

View Change

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]];

To view, visit change 26813. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I6a2e3e9c8743b229633204562712fda1433a78ec
Gerrit-Change-Number: 26813
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge@osmocom.org>
Gerrit-Reviewer: tnt <tnt@246tNt.com>
Gerrit-MessageType: newchange