summaryrefslogtreecommitdiffstats
path: root/compat
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-01-29 17:58:28 +0100
committerMarcel Holtmann <marcel@holtmann.org>2009-01-29 17:58:28 +0100
commit9c0b5859e6cc4b7a0e925fde8665990281b265d3 (patch)
tree8994dbe0942d56c9a7cf470fc3b2316d1f91e0a3 /compat
parent1ce81e1e0794a5d619016e17b33b533b614fc6a9 (diff)
Fix mostly every warning caused by -Wsign-compare
Diffstat (limited to 'compat')
-rw-r--r--compat/bnep.c12
-rw-r--r--compat/hidd.c4
-rw-r--r--compat/msdun.c3
-rw-r--r--compat/sdp.c2
4 files changed, 11 insertions, 10 deletions
diff --git a/compat/bnep.c b/compat/bnep.c
index f8d2b291..e9742c7a 100644
--- a/compat/bnep.c
+++ b/compat/bnep.c
@@ -128,7 +128,7 @@ int bnep_show_connections(void)
{
struct bnep_connlist_req req;
struct bnep_conninfo ci[48];
- int i;
+ unsigned int i;
req.cnum = 48;
req.ci = ci;
@@ -137,7 +137,7 @@ int bnep_show_connections(void)
return -1;
}
- for (i=0; i < req.cnum; i++) {
+ for (i = 0; i < req.cnum; i++) {
printf("%s %s %s\n", ci[i].device,
batostr((bdaddr_t *) ci[i].dst),
bnep_svc2str(ci[i].role));
@@ -162,7 +162,7 @@ int bnep_kill_all_connections(void)
{
struct bnep_connlist_req req;
struct bnep_conninfo ci[48];
- int i;
+ unsigned int i;
req.cnum = 48;
req.ci = ci;
@@ -171,7 +171,7 @@ int bnep_kill_all_connections(void)
return -1;
}
- for (i=0; i < req.cnum; i++) {
+ for (i = 0; i < req.cnum; i++) {
struct bnep_conndel_req req;
memcpy(req.dst, ci[i].dst, ETH_ALEN);
req.flags = 0;
@@ -227,7 +227,7 @@ int bnep_accept_connection(int sk, uint16_t role, char *dev)
errno = EPROTO;
- if (r < sizeof(*req))
+ if (r < (int) sizeof(*req))
return -1;
req = (void *) pkt;
@@ -292,7 +292,7 @@ receive:
errno = EPROTO;
- if (r < sizeof(*rsp))
+ if (r < (int) sizeof(*rsp))
return -1;
rsp = (void *) pkt;
diff --git a/compat/hidd.c b/compat/hidd.c
index a6f67410..212c0926 100644
--- a/compat/hidd.c
+++ b/compat/hidd.c
@@ -425,7 +425,7 @@ static void do_show(int ctl)
struct hidp_connlist_req req;
struct hidp_conninfo ci[16];
char addr[18];
- int i;
+ unsigned int i;
req.cnum = 16;
req.ci = ci;
@@ -598,7 +598,7 @@ static void do_kill(int ctl, bdaddr_t *bdaddr, uint32_t flags)
struct hidp_conndel_req req;
struct hidp_connlist_req cl;
struct hidp_conninfo ci[16];
- int i;
+ unsigned int i;
if (!bacmp(bdaddr, BDADDR_ALL)) {
cl.cnum = 16;
diff --git a/compat/msdun.c b/compat/msdun.c
index fab4c586..1759ef66 100644
--- a/compat/msdun.c
+++ b/compat/msdun.c
@@ -56,7 +56,8 @@ static void sig_alarm(int sig)
static int w4_str(int fd, char *str)
{
char buf[40];
- int r, len = 0;
+ unsigned len = 0;
+ int r;
while (1) {
r = read(fd, buf + len, sizeof(buf) - len - 1);
diff --git a/compat/sdp.c b/compat/sdp.c
index 941895d4..bb188f6a 100644
--- a/compat/sdp.c
+++ b/compat/sdp.c
@@ -71,7 +71,7 @@ static void epox_endian_quirk(unsigned char *data, int size)
*/
unsigned char pattern[] = { 0x05, 0x07, 0x19, 0x00, 0x2a, 0x00, 0xff,
0x15, 0x00, 0x26, 0x00, 0xff };
- int i;
+ unsigned int i;
if (!data)
return;