diff options
| author | 2009-08-03 19:20:07 +0200 | |
|---|---|---|
| committer | 2009-08-03 19:20:07 +0200 | |
| commit | 9a66df47b0468aeac8dcd975e5991581627357b3 (patch) | |
| tree | 2df3122cd3e76663e85450e59ca8bb50be138a68 /src | |
| parent | 1d006240c339dd950c5b4da8000289fba9105c0d (diff) | |
| download | usbmuxd-9a66df47b0468aeac8dcd975e5991581627357b3.tar.gz usbmuxd-9a66df47b0468aeac8dcd975e5991581627357b3.tar.bz2 | |
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 <nikias@gmx.li>
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.c | 4 | ||||
| -rw-r--r-- | src/usbmux.c | 2 |
2 files changed, 3 insertions, 3 deletions
| @@ -580,7 +580,7 @@ static void *usbmuxd_bulk_reader_thread(void *arg) | |||
| 580 | static void *usbmuxd_client_init_thread(void *arg) | 580 | static void *usbmuxd_client_init_thread(void *arg) |
| 581 | { | 581 | { |
| 582 | struct client_data *cdata; | 582 | struct client_data *cdata; |
| 583 | struct usbmuxd_scan_request *s_req = NULL; | 583 | struct usbmuxd_scan_request *s_req; |
| 584 | struct usbmuxd_device_info_record dev_info_rec; | 584 | struct usbmuxd_device_info_record dev_info_rec; |
| 585 | struct usbmuxd_connect_request *c_req = NULL; | 585 | struct usbmuxd_connect_request *c_req = NULL; |
| 586 | 586 | ||
| @@ -941,7 +941,7 @@ static void *usbmuxd_client_init_thread(void *arg) | |||
| 941 | cur_dev = NULL; | 941 | cur_dev = NULL; |
| 942 | if (device_count > 1) { | 942 | if (device_count > 1) { |
| 943 | struct device_info **newlist; | 943 | struct device_info **newlist; |
| 944 | int j; | 944 | int j = 0; |
| 945 | 945 | ||
| 946 | newlist = | 946 | newlist = |
| 947 | (struct device_info **) | 947 | (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, | |||
| 428 | int usbmux_free_device(usbmux_device_t device) | 428 | int usbmux_free_device(usbmux_device_t device) |
| 429 | { | 429 | { |
| 430 | char buf[512]; | 430 | char buf[512]; |
| 431 | int bytes; | 431 | int bytes = -1; |
| 432 | 432 | ||
| 433 | if (!device) | 433 | if (!device) |
| 434 | return -EINVAL; | 434 | return -EINVAL; |
