From c01cac81fd8941ee45affa73cff4f8800141c19e Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> Date: Thu, 10 Aug 2006 23:36:57 +0000 Subject: fix some compiler warnings, enable -Wall git-svn-id: https://svn.openpcd.org:2342/trunk@100 6dc7ffe9-61d6-0310-9af1-9938baff3ed1 --- openpcd/opcd_test/Makefile | 1 + openpcd/opcd_test/opcd_usb.c | 8 ++++---- 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; } -- cgit v1.2.3