From: Antonio Ospite Date: Tue, 28 Feb 2012 20:44:34 +0000 (+0100) Subject: am7xxx: silent a warning enabled by 'sparse' about an uninitialized variable X-Git-Tag: v0.1.0~1^2~32 X-Git-Url: https://git.ao2.it/libam7xxx.git/commitdiff_plain/a27837d8dd8b78b4fcc9224d83d2f85fdf8eb19f?ds=sidebyside;hp=db607f3facf905c460e813147155223f4816eee0 am7xxx: silent a warning enabled by 'sparse' about an uninitialized variable 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. --- 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;