]> code.delx.au - pulseaudio/commitdiff
remove a few compiler warnings in BlueZ code
authorLennart Poettering <lennart@poettering.net>
Mon, 29 Sep 2008 19:34:18 +0000 (21:34 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 29 Sep 2008 19:34:18 +0000 (21:34 +0200)
src/modules/bluetooth/ipc.c
src/modules/bluetooth/ipc.h
src/modules/bluetooth/sbc.c

index e7b712dafe0aace97815a5626f9e3564f3bed470..98256998aaf0128ffecd9d1e10d98eeae93ad26f 100644 (file)
@@ -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];
 }
-
index c900fcd142d10c67ded250187b674e1f482edb87..ae85e727c18def83ca8bce10afa3f2a809448905 100644 (file)
@@ -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);
index 6303421f1a9400ca1c8adf25eefdd432cebdc1e3..02a6143d650a714715f01b2450327e4dc2785c25 100644 (file)
@@ -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);