Commit 95f6f22c authored by Frediano Ziglio's avatar Frediano Ziglio
Browse files

Remove some warnings from Clang static analyzer



qmp-port.c:
warning: Although the value stored to 'node' is used in the enclosing
expression, the value is never actually read from 'node'

usb-backend.c:
warning: Value stored to 'done' is never read
warning: Use of memory after it is freed

usb-device-cd.c:
warning: Value stored to 'error' is never read
Signed-off-by: Frediano Ziglio's avatarFrediano Ziglio <freddy77@gmail.com>
parent 8d60d4fc
Pipeline #195501 passed with stage
in 7 minutes and 19 seconds
......@@ -104,7 +104,7 @@ spice_qmp_dispatch_message(SpiceQmpPort *self)
return TRUE;
}
if ((node = json_object_get_member(obj, "error"))) {
if (json_object_get_member(obj, "error") != NULL) {
gint id = json_object_get_int_member(obj, "id");
const gchar *desc = json_object_get_string_member(obj, "desc");
......
......@@ -867,7 +867,6 @@ usbredir_control_packet(void *priv, uint64_t id, struct usb_redir_control_packet
if (!done) {
device_ops(edev)->control_request(edev, data, data_len, &response, &out_buffer);
done = TRUE;
}
if (response.status) {
......@@ -1367,8 +1366,8 @@ void spice_usb_backend_channel_delete(SpiceUsbBackendChannel *ch)
free(ch->rules);
}
g_free(ch);
SPICE_DEBUG("%s << %p", __FUNCTION__, ch);
g_free(ch);
}
void
......
......@@ -150,7 +150,7 @@ static int cd_device_load(SpiceCdLU *unit, gboolean load)
if (load) {
error = ioctl(fd, CDROMCLOSETRAY, 0);
} else {
error = ioctl(fd, CDROM_LOCKDOOR, 0);
ioctl(fd, CDROM_LOCKDOOR, 0);
error = ioctl(fd, CDROMEJECT, 0);
}
if (error) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment