summaryrefslogtreecommitdiffstats
path: root/utils/jz4740_tools/jz4740_usbtool.c
diff options
context:
space:
mode:
authorMaurus Cuelenaere <mcuelenaere@gmail.com>2008-08-07 10:24:11 +0000
committerMaurus Cuelenaere <mcuelenaere@gmail.com>2008-08-07 10:24:11 +0000
commitc8bdcbf8ff7892011a084b4b6d6f35a75248e724 (patch)
tree86e94d539e1aecf40795a3406292866dab4deda5 /utils/jz4740_tools/jz4740_usbtool.c
parent99f68ea7e8d288a7c7c31bff685168b8b4632c0d (diff)
downloadrockbox-c8bdcbf8ff7892011a084b4b6d6f35a75248e724.tar.gz
rockbox-c8bdcbf8ff7892011a084b4b6d6f35a75248e724.tar.bz2
rockbox-c8bdcbf8ff7892011a084b4b6d6f35a75248e724.zip
jz4740 utilities:
* Fix TABs problem * Add IHFSsplit made by William Poetra Yoga Hadisoeseno * Fix compilation warnings git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18206 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/jz4740_tools/jz4740_usbtool.c')
-rw-r--r--utils/jz4740_tools/jz4740_usbtool.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/utils/jz4740_tools/jz4740_usbtool.c b/utils/jz4740_tools/jz4740_usbtool.c
index fe8771ae12..bc26804bdd 100644
--- a/utils/jz4740_tools/jz4740_usbtool.c
+++ b/utils/jz4740_tools/jz4740_usbtool.c
@@ -127,30 +127,30 @@ int filesize(FILE* fd)
return tmp;
}
-#define SEND_COMMAND(cmd, arg) err = usb_control_msg(dh, USB_ENDPOINT_OUT | USB_TYPE_VENDOR, cmd, arg>>16, arg&0xFFFF, NULL, 0, TOUT);\
+#define SEND_COMMAND(cmd, arg) err = usb_control_msg(dh, USB_ENDPOINT_OUT | USB_TYPE_VENDOR, (cmd), (arg)>>16, (arg)&0xFFFF, NULL, 0, TOUT);\
if (err < 0) \
{ \
fprintf(stderr,"\n[ERR] Error sending control message (%d, %s)\n", err, usb_strerror()); \
return -1; \
}
-#define GET_CPU_INFO(s) err = usb_control_msg(dh, USB_ENDPOINT_IN | USB_TYPE_VENDOR, VR_GET_CPU_INFO, 0, 0, s, 8, TOUT); \
+#define GET_CPU_INFO(s) err = usb_control_msg(dh, USB_ENDPOINT_IN | USB_TYPE_VENDOR, VR_GET_CPU_INFO, 0, 0, (s), 8, TOUT); \
if (err < 0) \
{ \
fprintf(stderr,"\n[ERR] Error sending control message (%d, %s)\n", err, usb_strerror()); \
return -1; \
}
-#define SEND_DATA(ptr, size) err = usb_bulk_write(dh, USB_ENDPOINT_OUT | EP_BULK_TO, ptr, size, TOUT); \
- if (err != size) \
+#define SEND_DATA(ptr, size) err = usb_bulk_write(dh, USB_ENDPOINT_OUT | EP_BULK_TO, ((char*)(ptr)), (size), TOUT); \
+ if (err != (size)) \
{ \
fprintf(stderr,"\n[ERR] Error writing data\n"); \
fprintf(stderr,"[ERR] Bulk write error (%d, %s)\n", err, strerror(-err)); \
return -1; \
}
-#define GET_DATA(ptr, size) err = usb_bulk_read(dh, USB_ENDPOINT_IN | EP_BULK_TO, ptr, size, TOUT); \
- if (err != size) \
+#define GET_DATA(ptr, size) err = usb_bulk_read(dh, USB_ENDPOINT_IN | EP_BULK_TO, ((char*)(ptr)), (size), TOUT); \
+ if (err != (size)) \
{ \
fprintf(stderr,"\n[ERR] Error writing data\n"); \
fprintf(stderr,"[ERR] Bulk write error (%d, %s)\n", err, strerror(-err)); \