aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorPete Batard <pete@akeo.ie>2012-06-28 22:49:47 +0100
committerPete Batard <pete@akeo.ie>2012-07-02 18:29:27 +0100
commit63f569be66a40a720bb797a87c3589f3e4de925a (patch)
treede87a88aeaef653a724a1843c566d4b2333ca607 /examples
parent0e0cbb6c27efa5a2ae58c30267a4be9486c766cc (diff)
downloadandroid_external_libusbx-63f569be66a40a720bb797a87c3589f3e4de925a.tar.gz
android_external_libusbx-63f569be66a40a720bb797a87c3589f3e4de925a.tar.bz2
android_external_libusbx-63f569be66a40a720bb797a87c3589f3e4de925a.zip
Misc: Fix more Clang warnings in core and darwin
* http://sourceforge.net/mailarchive/message.php?msg_id=29418038 * core.c:700:4: warning: Function call argument is an uninitialized value * darwin_usb.c:1713:11: warning: Access to field 'cfSource' results in a dereference of a null pointer (loaded from variable 'hpriv') * sync.c/dpfp.c/dpfp_threaded.c: warning: Result of 'malloc' is converted to a pointer of type 'unsigned char', which is incompatible with sizeof operand type
Diffstat (limited to 'examples')
-rw-r--r--examples/dpfp.c2
-rw-r--r--examples/dpfp_threaded.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/examples/dpfp.c b/examples/dpfp.c
index c7d6347..ff98b5d 100644
--- a/examples/dpfp.c
+++ b/examples/dpfp.c
@@ -164,7 +164,7 @@ static void LIBUSB_CALL cb_mode_changed(struct libusb_transfer *transfer)
static int set_mode_async(unsigned char data)
{
- unsigned char *buf = malloc(LIBUSB_CONTROL_SETUP_SIZE + 1);
+ unsigned char *buf = (unsigned char*) malloc(LIBUSB_CONTROL_SETUP_SIZE + 1);
struct libusb_transfer *transfer;
if (!buf)
diff --git a/examples/dpfp_threaded.c b/examples/dpfp_threaded.c
index e1df6ee..c8cbb28 100644
--- a/examples/dpfp_threaded.c
+++ b/examples/dpfp_threaded.c
@@ -193,7 +193,7 @@ static void LIBUSB_CALL cb_mode_changed(struct libusb_transfer *transfer)
static int set_mode_async(unsigned char data)
{
- unsigned char *buf = malloc(LIBUSB_CONTROL_SETUP_SIZE + 1);
+ unsigned char *buf = (unsigned char*) malloc(LIBUSB_CONTROL_SETUP_SIZE + 1);
struct libusb_transfer *transfer;
if (!buf)