summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2005-07-05 19:54:42 +0000
committerMarcel Holtmann <marcel@holtmann.org>2005-07-05 19:54:42 +0000
commite27896801ac0514289f57def3a8b5c1491d316c6 (patch)
tree31e2845dcc0e8edb9b8c15bda093392fedb4f396
parent60197f2a9074b5ca0ba9a5711b695f65089f99ec (diff)
Fix some GCC 4.0 warnings
-rw-r--r--src/hci.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/hci.c b/src/hci.c
index db6e6da1..59f2afa7 100644
--- a/src/hci.c
+++ b/src/hci.c
@@ -717,8 +717,9 @@ int hci_send_req(int dd, struct hci_request *r, int to)
unsigned char buf[HCI_MAX_EVENT_SIZE], *ptr;
uint16_t opcode = htobs(cmd_opcode_pack(r->ogf, r->ocf));
struct hci_filter nf, of;
+ socklen_t len;
hci_event_hdr *hdr;
- int err, len, try;
+ int err, try;
len = sizeof(of);
if (getsockopt(dd, SOL_HCI, HCI_FILTER, &of, &len) < 0)
@@ -903,7 +904,7 @@ int hci_read_local_name(int dd, int len, char *name, int to)
}
rp.name[247] = '\0';
- strncpy(name, rp.name, len);
+ strncpy(name, (char *) rp.name, len);
return 0;
}
@@ -913,7 +914,7 @@ int hci_write_local_name(int dd, const char *name, int to)
struct hci_request rq;
memset(&cp, 0, sizeof(cp));
- strncpy(cp.name, name, sizeof(cp.name));
+ strncpy((char *) cp.name, name, sizeof(cp.name));
memset(&rq, 0, sizeof(rq));
rq.ogf = OGF_HOST_CTL;
@@ -956,7 +957,7 @@ int hci_read_remote_name_with_clock_offset(int dd, const bdaddr_t *bdaddr, uint8
}
rn.name[247] = '\0';
- strncpy(name, rn.name, len);
+ strncpy(name, (char *) rn.name, len);
return 0;
}