From 9a66df47b0468aeac8dcd975e5991581627357b3 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Mon, 3 Aug 2009 19:20:07 +0200 Subject: Fix build warnings usbmux.c: In function ‘usbmux_free_device’: usbmux.c:412: warning: ‘bytes’ may be used uninitialized in this function main.c: In function ‘usbmuxd_client_init_thread’: main.c:197: warning: dereferencing pointer ‘s_req.55’ does break strict-aliasing rules main.c:613: note: initialized from here main.c:944: warning: ‘j’ may be used uninitialized in this function Signed-off-by: Nikias Bassen --- src/main.c | 4 ++-- src/usbmux.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.c b/src/main.c index cd87632..ee633b6 100644 --- a/src/main.c +++ b/src/main.c @@ -580,7 +580,7 @@ static void *usbmuxd_bulk_reader_thread(void *arg) static void *usbmuxd_client_init_thread(void *arg) { struct client_data *cdata; - struct usbmuxd_scan_request *s_req = NULL; + struct usbmuxd_scan_request *s_req; struct usbmuxd_device_info_record dev_info_rec; struct usbmuxd_connect_request *c_req = NULL; @@ -941,7 +941,7 @@ static void *usbmuxd_client_init_thread(void *arg) cur_dev = NULL; if (device_count > 1) { struct device_info **newlist; - int j; + int j = 0; newlist = (struct device_info **) diff --git a/src/usbmux.c b/src/usbmux.c index dd3ac1a..ed23278 100644 --- a/src/usbmux.c +++ b/src/usbmux.c @@ -428,7 +428,7 @@ int usbmux_get_specific_device(int bus_n, int dev_n, int usbmux_free_device(usbmux_device_t device) { char buf[512]; - int bytes; + int bytes = -1; if (!device) return -EINVAL; -- cgit v1.1-32-gdbae