]> git.ipfire.org Git - thirdparty/qemu.git/commit
usb/dev-mtp: Fix use of uninitialized values
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>
Mon, 4 Jun 2018 15:14:20 +0000 (12:14 -0300)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Thu, 21 Jun 2018 15:18:22 +0000 (10:18 -0500)
commitaba59705d963b79f5732f2265fa2175654b61db8
tree7de39192c54a68504017edbd3ba183762083bc3e
parent17e3fcbc51eddf06f50d59fb96a21a3298b25cd3
usb/dev-mtp: Fix use of uninitialized values

This fixes:

  hw/usb/dev-mtp.c:971:5: warning: 4th function call argument is an uninitialized value
      trace_usb_mtp_op_get_partial_object(s->dev.addr, o->handle, o->path,
                                           c->argv[1], c->argv[2]);
                                                       ^~~~~~~~~~
and:

  hw/usb/dev-mtp.c:981:12: warning: Assigned value is garbage or undefined
      offset = c->argv[1];
               ^ ~~~~~~~~~~

Reported-by: Clang Static Analyzer
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20180604151421.23385-3-f4bug@amsat.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
(cherry picked from commit 62713a2e50f653162387451034f1a2490e87be88)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/usb/dev-mtp.c