[Spice-devel] [PATCH usbredir 9/9] Eliminate some warnings.
Jeremy White
jwhite at codeweavers.com
Wed Dec 9 14:17:04 PST 2015
Signed-off-by: Jeremy White <jwhite at codeweavers.com>
---
usbredirtestserver/usbredirtestserver.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/usbredirtestserver/usbredirtestserver.c b/usbredirtestserver/usbredirtestserver.c
index 4a071f0..81bdda2 100644
--- a/usbredirtestserver/usbredirtestserver.c
+++ b/usbredirtestserver/usbredirtestserver.c
@@ -355,6 +355,8 @@ void run_one_device(int fd, char *script_file, int id)
usbredirparser_destroy(parser);
+ free_command_buffer(private_info.cmd);
+
exit(!running);
}
@@ -461,7 +463,6 @@ int main(int argc, char *argv[])
}
while (running) {
- int status;
fd_set readfds;
int nfds;
struct timeval tv;
@@ -540,7 +541,7 @@ static int parse_ctrl(char *buf, struct usb_redir_control_packet_header *ctrl,
*data = malloc(strlen(buf + pos1) + 1);
if (!*data) {
- fprintf(stderr, "Out of memory allocating %d!\n", strlen(buf + pos1) + 1);
+ fprintf(stderr, "Out of memory allocating %ld!\n", strlen(buf + pos1) + 1);
return -2;
}
memset(*data, 0, strlen(buf + pos1) + 1);
@@ -610,8 +611,6 @@ static void usbredirtestserver_cmdline_expect(private_info_t *info, char *buf)
static void usbredirtestserver_cmdline_device(private_info_t *info, char *buf)
{
- int i;
-
memset(&info->device_connect, 0, sizeof(info->device_connect));
if (7 != sscanf(buf, "%hhx:%hhx:%hhx:%hhx:%hx:%hx:%hx",
&info->device_connect.speed,
--
2.1.4
More information about the Spice-devel
mailing list