From a27837d8dd8b78b4fcc9224d83d2f85fdf8eb19f Mon Sep 17 00:00:00 2001 From: Antonio Ospite Date: Tue, 28 Feb 2012 21:44:34 +0100 Subject: [PATCH 1/1] am7xxx: silent a warning enabled by 'sparse' about an uninitialized variable MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit src/am7xxx.c:423:6: warning: ‘ret’ may be used uninitialized in this function [-Wuninitialized] If libusb_get_device_list() returned 0 we didn't have 'ret' properly initialized. --- src/am7xxx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/am7xxx.c b/src/am7xxx.c index 114027e..11c259d 100644 --- a/src/am7xxx.c +++ b/src/am7xxx.c @@ -464,6 +464,8 @@ static int scan_devices(am7xxx_context *ctx, scan_op op, goto out; } + /* everything went fine when building the device list */ + ret = 0; out: libusb_free_device_list(list, 1); return ret; -- 2.1.4