[Spice-devel] [PATCH (v2)] Small cleanups to address compiler warnings

Michael Tokarev mjt at tls.msk.ru
Mon Feb 11 09:24:50 PST 2013


11.02.2013 18:49, Serge Hallyn wrote:
> Changelog: Feb 11: Address feedback by Marc-André:
> 
> Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>

Signed-off-By: Michael Tokarev <mjt at tls.msk.ru>

(Or you can use Reviewed-by, whatever).

>  server/tests/basic_event_loop.c  | 4 ++--
>  server/tests/test_display_base.c | 8 +++++---
>  2 files changed, 7 insertions(+), 5 deletions(-)
> 
> diff --git a/server/tests/basic_event_loop.c b/server/tests/basic_event_loop.c
> index c6f6698..57303a2 100644
> --- a/server/tests/basic_event_loop.c
> +++ b/server/tests/basic_event_loop.c
> @@ -115,7 +115,7 @@ static void watch_remove(SpiceWatch *watch)
>  
>  static void channel_event(int event, SpiceChannelEventInfo *info)
>  {
> -    DPRINTF(0, "channel event con, type, id, event: %ld, %d, %d, %d",
> +    DPRINTF(0, "channel event con, type, id, event: %d, %d, %d, %d",
>              info->connection_id, info->type, info->id, event);
>  }
>  
> @@ -215,7 +215,7 @@ void basic_event_loop_mainloop(void)
>          if ((next_timer = get_next_timer()) != NULL) {
>              calc_next_timeout(next_timer, &next_timer_timeout);
>              timeout = &next_timer_timeout;
> -            DPRINTF(2, "timeout of %zd.%06zd",
> +            DPRINTF(2, "timeout of %ld.%06ld",
>                      timeout->tv_sec, timeout->tv_usec);
>          } else {
>              timeout = NULL;
> diff --git a/server/tests/test_display_base.c b/server/tests/test_display_base.c
> index 588e960..bc01398 100644
> --- a/server/tests/test_display_base.c
> +++ b/server/tests/test_display_base.c
> @@ -42,7 +42,7 @@ static void test_spice_destroy_update(SimpleSpiceUpdate *update)
>          return;
>      }
>      if (update->drawable.clip.type != SPICE_CLIP_TYPE_NONE) {
> -        free((uint8_t*)update->drawable.clip.data);
> +        free(update->drawable.clip.data);
>      }
>      free(update->bitmap);
>      free(update);
> @@ -89,10 +89,11 @@ static void regression_test(void)
>      pid = fork();
>      if (pid == 0) {
>          char buf[PATH_MAX];
> +        char *argp[] = {NULL};
>          char *envp[] = {buf, NULL};
>  
>          snprintf(buf, sizeof(buf), "PATH=%s", getenv("PATH"));
> -        execve("regression_test.py", NULL, envp);
> +        execve("regression_test.py", argp, envp);
>      } else if (pid > 0) {
>          return;
>      }
> @@ -701,13 +702,14 @@ static int flush_resources(QXLInstance *qin)
>      return TRUE;
>  }
>  
> -static void client_monitors_config(QXLInstance *qin, VDAgentMonitorsConfig *monitors_config)
> +static int client_monitors_config(QXLInstance *qin, VDAgentMonitorsConfig *monitors_config)
>  {
>      if (!monitors_config) {
>          printf("%s: NULL monitors_config\n", __func__);
>      } else {
>          printf("%s: %d\n", __func__, monitors_config->num_of_monitors);
>      }
> +    return 1;
>  }
>  
>  QXLInterface display_sif = {



More information about the Spice-devel mailing list