summaryrefslogtreecommitdiff
path: root/compat
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2011-05-15 01:57:12 +0300
committerJohan Hedberg <johan.hedberg@intel.com>2011-05-15 01:57:12 +0300
commit2076574365b22a211b569a4dcc9a4df6f924f41c (patch)
tree8da7f776fcfd18ab7fea33b1eefccbfa36c132d6 /compat
parent0e047a188b6c287ee9716fa0186c7e5ecc74e759 (diff)
Fix unused variable warnings reported by GCC 4.6
Diffstat (limited to 'compat')
-rw-r--r--compat/fakehid.c7
-rw-r--r--compat/hidd.c5
2 files changed, 5 insertions, 7 deletions
diff --git a/compat/fakehid.c b/compat/fakehid.c
index f0d88931c..66161b3f7 100644
--- a/compat/fakehid.c
+++ b/compat/fakehid.c
@@ -60,20 +60,19 @@ static void sig_term(int sig)
__io_canceled = 1;
}
-static void send_event(int fd, uint16_t type, uint16_t code, int32_t value)
+static int send_event(int fd, uint16_t type, uint16_t code, int32_t value)
{
struct uinput_event event;
- int len;
if (fd <= fileno(stderr))
- return;
+ return -EINVAL;
memset(&event, 0, sizeof(event));
event.type = type;
event.code = code;
event.value = value;
- len = write(fd, &event, sizeof(event));
+ return write(fd, &event, sizeof(event));
}
static int uinput_create(char *name, int keyboard, int mouse)
diff --git a/compat/hidd.c b/compat/hidd.c
index 2dae3a767..64dd455e6 100644
--- a/compat/hidd.c
+++ b/compat/hidd.c
@@ -237,14 +237,13 @@ static int request_encryption(bdaddr_t *src, bdaddr_t *dst)
return err;
}
-static void enable_sixaxis(int csk)
+static int enable_sixaxis(int csk)
{
const unsigned char buf[] = {
0x53 /*HIDP_TRANS_SET_REPORT | HIDP_DATA_RTYPE_FEATURE*/,
0xf4, 0x42, 0x03, 0x00, 0x00 };
- int err;
- err = write(csk, buf, sizeof(buf));
+ return write(csk, buf, sizeof(buf));
}
static int create_device(int ctl, int csk, int isk, uint8_t subclass, int nosdp, int nocheck, int bootonly, int encrypt, int timeout)