summaryrefslogtreecommitdiffstats
path: root/hcid
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 /hcid
parent952e7cc56afa29f77a828aa256985ba38a06fa80 (diff)
Fix some GCC 4.0 warnings
Diffstat (limited to 'hcid')
-rw-r--r--hcid/main.c4
-rw-r--r--hcid/parser.y12
-rw-r--r--hcid/security.c6
-rw-r--r--hcid/storage.c2
4 files changed, 12 insertions, 12 deletions
diff --git a/hcid/main.c b/hcid/main.c
index 57637f3e..ecfc7db6 100644
--- a/hcid/main.c
+++ b/hcid/main.c
@@ -226,7 +226,7 @@ static void configure_device(int hdev)
if ((device_opts->flags & (1 << HCID_SET_NAME)) && device_opts->name) {
change_local_name_cp cp;
memset(cp.name, 0, sizeof(cp.name));
- expand_name(cp.name, sizeof(cp.name), device_opts->name, hdev);
+ expand_name((char *) cp.name, sizeof(cp.name), device_opts->name, hdev);
hci_send_cmd(s, OGF_HOST_CTL, OCF_CHANGE_LOCAL_NAME,
CHANGE_LOCAL_NAME_CP_SIZE, &cp);
@@ -459,7 +459,7 @@ static gboolean io_stack_event(GIOChannel *chan, GIOCondition cond, gpointer dat
ptr = buf;
- if ((err = g_io_channel_read(chan, buf, sizeof(buf), &len))) {
+ if ((err = g_io_channel_read(chan, (gchar *) buf, sizeof(buf), &len))) {
if (err == G_IO_ERROR_AGAIN)
return TRUE;
diff --git a/hcid/parser.y b/hcid/parser.y
index 7616ab56..d3cbd936 100644
--- a/hcid/parser.y
+++ b/hcid/parser.y
@@ -262,14 +262,14 @@ bdaddr:
pkt_type:
WORD {
- int opt;
+ unsigned int opt;
if (!hci_strtoptype($1, &opt))
cfg_error("Unknown packet type '%s'", $1);
$$ = opt;
}
| LIST {
- int opt;
+ unsigned int opt;
if (!hci_strtoptype($1, &opt))
cfg_error("Unknown packet type '%s'", $1);
$$ = opt;
@@ -278,14 +278,14 @@ pkt_type:
link_mode:
WORD {
- int opt;
+ unsigned int opt;
if (!hci_strtolm($1, &opt))
cfg_error("Unknown link mode '%s'", $1);
$$ = opt;
}
| LIST {
- int opt;
+ unsigned int opt;
if (!hci_strtolm($1, &opt))
cfg_error("Unknown link mode '%s'", $1);
$$ = opt;
@@ -294,14 +294,14 @@ link_mode:
link_policy:
WORD {
- int opt;
+ unsigned int opt;
if (!hci_strtolp($1, &opt))
cfg_error("Unknown link policy '%s'", $1);
$$ = opt;
}
| LIST {
- int opt;
+ unsigned int opt;
if (!hci_strtolp($1, &opt))
cfg_error("Unknown link policy '%s'", $1);
$$ = opt;
diff --git a/hcid/security.c b/hcid/security.c
index 921875b3..04f5b9b8 100644
--- a/hcid/security.c
+++ b/hcid/security.c
@@ -471,7 +471,7 @@ static void remote_name_information(int dev, bdaddr_t *sba, void *ptr)
if (evt->status)
return;
- write_device_name(sba, dba, evt->name);
+ write_device_name(sba, dba, (char *) evt->name);
}
static void remote_version_information(int dev, bdaddr_t *sba, void *ptr)
@@ -518,7 +518,7 @@ static gboolean io_security_event(GIOChannel *chan, GIOCondition cond, gpointer
return FALSE;
}
- if ((err = g_io_channel_read(chan, buf, sizeof(buf), &len))) {
+ if ((err = g_io_channel_read(chan, (gchar *) buf, sizeof(buf), &len))) {
if (err == G_IO_ERROR_AGAIN)
return TRUE;
g_io_channel_close(chan);
@@ -664,7 +664,7 @@ void init_security_data(void)
{
/* Set local PIN code */
if (read_default_pin_code() < 0) {
- strcpy(hcid.pin_code, "BlueZ");
+ strcpy((char *) hcid.pin_code, "BlueZ");
hcid.pin_len = 5;
}
diff --git a/hcid/storage.c b/hcid/storage.c
index 284952f4..459ebff6 100644
--- a/hcid/storage.c
+++ b/hcid/storage.c
@@ -56,7 +56,7 @@ struct list {
};
static struct list *list_add(struct list *list, const bdaddr_t *bdaddr,
- const unsigned char *data, const size_t size)
+ const char *data, const size_t size)
{
struct list *temp = list, *last = list;