summaryrefslogtreecommitdiff
path: root/openpcd
diff options
context:
space:
mode:
author(no author) <(no author)@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2006-08-10 23:36:57 +0000
committer(no author) <(no author)@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2006-08-10 23:36:57 +0000
commitc01cac81fd8941ee45affa73cff4f8800141c19e (patch)
tree503324985b910429765bb96332c21a0b8432160e /openpcd
parent4c1c0deb058ff8781362fb17fa3f5d5ac7c440d9 (diff)
fix some compiler warnings, enable -Wall
git-svn-id: https://svn.openpcd.org:2342/trunk@100 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
Diffstat (limited to 'openpcd')
-rw-r--r--openpcd/opcd_test/Makefile1
-rw-r--r--openpcd/opcd_test/opcd_usb.c8
2 files changed, 5 insertions, 4 deletions
diff --git a/openpcd/opcd_test/Makefile b/openpcd/opcd_test/Makefile
index edae90f..f134513 100644
--- a/openpcd/opcd_test/Makefile
+++ b/openpcd/opcd_test/Makefile
@@ -1,5 +1,6 @@
#!/usr/bin/make
LDFLAGS=-lusb
+CFLAGS=-Wall
all: opcd_test
diff --git a/openpcd/opcd_test/opcd_usb.c b/openpcd/opcd_test/opcd_usb.c
index 70b40a0..bd6eeb4 100644
--- a/openpcd/opcd_test/opcd_usb.c
+++ b/openpcd/opcd_test/opcd_usb.c
@@ -60,7 +60,7 @@ static void opcd_dump_hdr(struct openpcd_hdr *hdr)
{
printf("IRQ: cmd=0x%02x, flags=0x%02x, reg=0x%02x, val=0x%02x "
"len=%d, res=%d\n", hdr->cmd, hdr->flags, hdr->reg,
- hdr->val, hdr->len);
+ hdr->val, hdr->len, hdr->res);
}
static void handle_interrupt(struct usbdevfs_urb *uurb, void *userdata)
@@ -135,8 +135,7 @@ void opcd_fini(struct opcd_handle *od)
int opcd_recv_reply(struct opcd_handle *od, char *buf, int len)
{
- int ret, i;
-
+ int ret;
memset(buf, 0, sizeof(buf));
ret = ausb_bulk_read(od->hdl, OPCD_IN_EP, buf, len, 1000);
@@ -180,6 +179,7 @@ int opcd_send_command(struct opcd_handle *od, u_int8_t cmd,
if (ret < 0) {
fprintf(stderr, "bulk_write returns %d(%s)\n", ret,
usb_strerror());
- return ret;
}
+
+ return ret;
}
personal git repositories of Harald Welte. Your mileage may vary