summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2005-07-05 21:15:41 +0000
committerMarcel Holtmann <marcel@holtmann.org>2005-07-05 21:15:41 +0000
commit1f422e5f2b343d35a8c77ce4be16f74b2819b2bf (patch)
treee24bdebe86afcff3ce29cc0f47f05caec7ab7bc0 /tools
parent952e7cc56afa29f77a828aa256985ba38a06fa80 (diff)
Fix some GCC 4.0 warnings
Diffstat (limited to 'tools')
-rw-r--r--tools/avctrl.c2
-rw-r--r--tools/ciptool.c3
-rw-r--r--tools/dfu.c8
-rw-r--r--tools/dfu.h4
-rw-r--r--tools/dfutool.c4
-rw-r--r--tools/hcitool.c8
-rw-r--r--tools/hid2hci.c2
-rw-r--r--tools/sdptool.c4
8 files changed, 19 insertions, 16 deletions
diff --git a/tools/avctrl.c b/tools/avctrl.c
index 120a382f..14d42e4a 100644
--- a/tools/avctrl.c
+++ b/tools/avctrl.c
@@ -82,7 +82,7 @@ struct device_info {
static int dongle_csr(struct device_info *devinfo)
{
- unsigned char buf[8];
+ char buf[8];
struct usb_dev_handle *udev;
int err, intf = 2;
diff --git a/tools/ciptool.c b/tools/ciptool.c
index 7c952cf4..38446f93 100644
--- a/tools/ciptool.c
+++ b/tools/ciptool.c
@@ -134,7 +134,8 @@ static int do_connect(int ctl, int dev_id, bdaddr_t *src, bdaddr_t *dst, unsigne
struct hci_dev_info di;
struct sockaddr_l2 addr;
struct l2cap_options opts;
- int sk, size;
+ socklen_t size;
+ int sk;
hci_devinfo(dev_id, &di);
if (!(di.link_policy & HCI_LP_RSWITCH)) {
diff --git a/tools/dfu.c b/tools/dfu.c
index b46027a0..bfbc0f2d 100644
--- a/tools/dfu.c
+++ b/tools/dfu.c
@@ -114,7 +114,7 @@ int dfu_detach(struct usb_dev_handle *udev, int intf)
DFU_DETACH, 0x1388, intf, NULL, 0, DFU_TIMEOUT);
}
-int dfu_upload(struct usb_dev_handle *udev, int intf, int block, unsigned char *buffer, int size)
+int dfu_upload(struct usb_dev_handle *udev, int intf, int block, char *buffer, int size)
{
if (!udev)
return -EIO;
@@ -123,7 +123,7 @@ int dfu_upload(struct usb_dev_handle *udev, int intf, int block, unsigned char *
DFU_UPLOAD, block, intf, buffer, size, DFU_TIMEOUT);
}
-int dfu_download(struct usb_dev_handle *udev, int intf, int block, unsigned char *buffer, int size)
+int dfu_download(struct usb_dev_handle *udev, int intf, int block, char *buffer, int size)
{
if (!udev)
return -EIO;
@@ -138,7 +138,7 @@ int dfu_get_status(struct usb_dev_handle *udev, int intf, struct dfu_status *sta
return -EIO;
return usb_control_msg(udev, USB_TYPE_CLASS | USB_DIR_IN | USB_RECIP_INTERFACE,
- DFU_GETSTATUS, 0, intf, (unsigned char *) status, DFU_STATUS_SIZE, DFU_TIMEOUT);
+ DFU_GETSTATUS, 0, intf, (char *) status, DFU_STATUS_SIZE, DFU_TIMEOUT);
}
int dfu_clear_status(struct usb_dev_handle *udev, int intf)
@@ -156,7 +156,7 @@ int dfu_get_state(struct usb_dev_handle *udev, int intf, uint8_t *state)
return -EIO;
return usb_control_msg(udev, USB_TYPE_CLASS | USB_DIR_IN | USB_RECIP_INTERFACE,
- DFU_GETSTATE, 0, intf, (unsigned char *) state, 1, DFU_TIMEOUT);
+ DFU_GETSTATE, 0, intf, (char *) state, 1, DFU_TIMEOUT);
}
int dfu_abort(struct usb_dev_handle *udev, int intf)
diff --git a/tools/dfu.h b/tools/dfu.h
index 1a253505..915efd8c 100644
--- a/tools/dfu.h
+++ b/tools/dfu.h
@@ -100,8 +100,8 @@ struct dfu_suffix {
/* DFU interface */
int dfu_detach(struct usb_dev_handle *udev, int intf);
-int dfu_upload(struct usb_dev_handle *udev, int intf, int block, unsigned char *buffer, int size);
-int dfu_download(struct usb_dev_handle *udev, int intf, int block, unsigned char *buffer, int size);
+int dfu_upload(struct usb_dev_handle *udev, int intf, int block, char *buffer, int size);
+int dfu_download(struct usb_dev_handle *udev, int intf, int block, char *buffer, int size);
int dfu_get_status(struct usb_dev_handle *udev, int intf, struct dfu_status *status);
int dfu_clear_status(struct usb_dev_handle *udev, int intf);
int dfu_get_state(struct usb_dev_handle *udev, int intf, uint8_t *state);
diff --git a/tools/dfutool.c b/tools/dfutool.c
index 47510cef..06da5248 100644
--- a/tools/dfutool.c
+++ b/tools/dfutool.c
@@ -400,7 +400,7 @@ static void cmd_upgrade(char *device, int argc, char **argv)
struct dfu_status status;
struct dfu_suffix suffix;
struct stat st;
- unsigned char *buf;
+ char *buf;
unsigned long filesize, count, timeout = 0;
char *filename;
uint32_t crc;
@@ -568,7 +568,7 @@ static void cmd_archive(char *device, int argc, char **argv)
struct usb_dev_handle *udev;
struct dfu_status status;
struct dfu_suffix suffix;
- unsigned char buf[2048];
+ char buf[2048];
unsigned long timeout = 0;
char *filename;
uint32_t crc;
diff --git a/tools/hcitool.c b/tools/hcitool.c
index ceddeda5..156b0790 100644
--- a/tools/hcitool.c
+++ b/tools/hcitool.c
@@ -819,7 +819,7 @@ static char *cmd_help =
static void cmd_cmd(int dev_id, int argc, char **argv)
{
- char buf[HCI_MAX_EVENT_SIZE], *ptr = buf;
+ unsigned char buf[HCI_MAX_EVENT_SIZE], *ptr = buf;
struct hci_filter flt;
hci_event_hdr *hdr;
int i, opt, len, dd;
@@ -940,9 +940,10 @@ static char *cc_help =
static void cmd_cc(int dev_id, int argc, char **argv)
{
bdaddr_t bdaddr;
- int opt, ptype, dd;
uint16_t handle;
uint8_t role;
+ unsigned int ptype;
+ int dd, opt;
role = 0x01;
ptype = HCI_DM1 | HCI_DM3 | HCI_DM5 | HCI_DH1 | HCI_DH3 | HCI_DH5;
@@ -1451,7 +1452,8 @@ static void cmd_cpt(int dev_id, int argc, char **argv)
set_conn_ptype_cp cp;
evt_conn_ptype_changed rp;
bdaddr_t bdaddr;
- int opt, dd, ptype;
+ unsigned int ptype;
+ int dd, opt;
for_each_opt(opt, cpt_options, NULL) {
switch (opt) {
diff --git a/tools/hid2hci.c b/tools/hid2hci.c
index 115e0ef5..9a85c1fd 100644
--- a/tools/hid2hci.c
+++ b/tools/hid2hci.c
@@ -130,7 +130,7 @@ static int switch_hidproxy(struct device_info *devinfo)
return err;
}
-static int send_report(int fd, const unsigned char *buf, size_t size)
+static int send_report(int fd, const char *buf, size_t size)
{
struct hiddev_report_info rinfo;
struct hiddev_usage_ref uref;
diff --git a/tools/sdptool.c b/tools/sdptool.c
index 97282e8d..3a2ce834 100644
--- a/tools/sdptool.c
+++ b/tools/sdptool.c
@@ -874,7 +874,7 @@ static int set_attribseq(sdp_session_t *session, uint32_t handle, uint16_t attri
if (!strncasecmp(argv[i], "u0x", 3)) {
/* UUID16 */
uint16_t value_int = strtoul((argv[i]) + 3, NULL, 16);
- uuid_t *value_uuid = (uuid_t *)malloc(sizeof(uuid_t));
+ uuid_t *value_uuid = (uuid_t *) malloc(sizeof(uuid_t));
allocArray[i] = value_uuid;
sdp_uuid16_create(value_uuid, value_int);
@@ -883,7 +883,7 @@ static int set_attribseq(sdp_session_t *session, uint32_t handle, uint16_t attri
valueArray[i] = &value_uuid->value.uuid16;
} else if (!strncasecmp(argv[i], "0x", 2)) {
/* Int */
- uint32_t *value_int = (int *)malloc(sizeof(int));
+ uint32_t *value_int = (uint32_t *) malloc(sizeof(int));
allocArray[i] = value_int;
*value_int = strtoul((argv[i]) + 2, NULL, 16);