From a0f44e01cccb289a4b85b9c1ce0799d627d125a5 Mon Sep 17 00:00:00 2001 From: Gareth McMullin Date: Sun, 8 Mar 2015 19:38:33 -0700 Subject: [PATCH] uprade: Fix warning on pointer sign. --- upgrade/dfu.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/upgrade/dfu.c b/upgrade/dfu.c index 598780a..39d3ab4 100644 --- a/upgrade/dfu.c +++ b/upgrade/dfu.c @@ -84,12 +84,13 @@ int dfu_getstate(usb_dev_handle *dev, uint16_t iface) int i; uint8_t state; do { - i = usb_control_msg(dev, + i = usb_control_msg(dev, USB_ENDPOINT_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE, - DFU_GETSTATE, 0, iface, &state, 1, USB_DEFAULT_TIMEOUT); + DFU_GETSTATE, 0, iface, (char*)&state, 1, + USB_DEFAULT_TIMEOUT); } while(i == 0); - if(i > 0) + if (i > 0) return state; else return i;