[Spice-devel] [PATCH] tests: Fix -Werror=format-zero-length build failure

Frediano Ziglio fziglio at redhat.com
Tue Sep 29 07:52:55 PDT 2015


> replay.c: In function 'replay_channel_event':
> replay.c:226:16: error: zero-length gnu_printf format string
> [-Werror=format-zero-length]
>      g_printerr("");
> ---
>  server/tests/replay.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/server/tests/replay.c b/server/tests/replay.c
> index efa97e9..c1a53b1 100644
> --- a/server/tests/replay.c
> +++ b/server/tests/replay.c
> @@ -223,7 +223,7 @@ static QXLInterface display_sif = {
>  
>  static void replay_channel_event(int event, SpiceChannelEventInfo *info)
>  {
> -    g_printerr("");
> +    g_printerr("channel event");
>  
>      if (info->type == SPICE_CHANNEL_DISPLAY &&
>          event == SPICE_CHANNEL_EVENT_INITIALIZED) {
> --
> 2.5.0
>

Actually from https://developer.gnome.org/glib/stable/glib-Warnings-and-Assertions.html#g-printerr
this was kind of a no-op so perhaps just removing the line is fine.
There is no call to g_set_printerr_handler call in either spice-server or qemu.

Frediano


More information about the Spice-devel mailing list