summaryrefslogtreecommitdiffstats
path: root/src/modules/bluetooth
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2008-09-29 21:34:18 +0200
committerLennart Poettering <lennart@poettering.net>2008-09-29 21:34:18 +0200
commit60e9744f281cde85790dd764cd4e52dc4b19f6b1 (patch)
tree71b8524d2079289151bd157422d4ebbb1937d910 /src/modules/bluetooth
parent87971c8707cf84e0f386b5fe5329c8aff155e629 (diff)
remove a few compiler warnings in BlueZ code
Diffstat (limited to 'src/modules/bluetooth')
-rw-r--r--src/modules/bluetooth/ipc.c7
-rw-r--r--src/modules/bluetooth/ipc.h2
-rw-r--r--src/modules/bluetooth/sbc.c2
3 files changed, 5 insertions, 6 deletions
diff --git a/src/modules/bluetooth/ipc.c b/src/modules/bluetooth/ipc.c
index e7b712da..98256998 100644
--- a/src/modules/bluetooth/ipc.c
+++ b/src/modules/bluetooth/ipc.c
@@ -40,7 +40,7 @@ static const char *strmsg[] = {
"BT_STREAMFD_IND",
};
-int bt_audio_service_open()
+int bt_audio_service_open(void)
{
int sk;
int err;
@@ -88,7 +88,7 @@ int bt_audio_service_get_data_fd(int sk)
msgh.msg_control = &cmsg_b;
msgh.msg_controllen = CMSG_LEN(sizeof(int));
- ret = recvmsg(sk, &msgh, 0);
+ ret = (int) recvmsg(sk, &msgh, 0);
if (ret < 0) {
err = errno;
fprintf(stderr, "%s: Unable to receive fd: %s (%d)\n",
@@ -111,9 +111,8 @@ int bt_audio_service_get_data_fd(int sk)
const char *bt_audio_strmsg(int type)
{
- if (type < 0 || type > (sizeof(strmsg) / sizeof(strmsg[0])))
+ if (type < 0 || (size_t) type > (sizeof(strmsg) / sizeof(strmsg[0])))
return NULL;
return strmsg[type];
}
-
diff --git a/src/modules/bluetooth/ipc.h b/src/modules/bluetooth/ipc.h
index c900fcd1..ae85e727 100644
--- a/src/modules/bluetooth/ipc.h
+++ b/src/modules/bluetooth/ipc.h
@@ -289,7 +289,7 @@ struct bt_control_ind {
/* Function declaration */
/* Opens a connection to the audio service: return a socket descriptor */
-int bt_audio_service_open();
+int bt_audio_service_open(void);
/* Closes a connection to the audio service */
int bt_audio_service_close(int sk);
diff --git a/src/modules/bluetooth/sbc.c b/src/modules/bluetooth/sbc.c
index 6303421f..02a6143d 100644
--- a/src/modules/bluetooth/sbc.c
+++ b/src/modules/bluetooth/sbc.c
@@ -145,7 +145,7 @@ static uint8_t sbc_crc8(const uint8_t *data, size_t len)
octet = data[i];
for (i = 0; i < len % 8; i++) {
- char bit = ((octet ^ crc) & 0x80) >> 7;
+ unsigned char bit = ((octet ^ crc) & 0x80) >> 7;
crc = ((crc & 0x7f) << 1) ^ (bit ? 0x1d : 0);