[Spice-devel] [PATCH] Fix build warning when RED_WORKER_STAT is undefined
Victor Toso
lists at victortoso.com
Wed May 25 07:22:49 UTC 2016
Hi,
On Tue, May 24, 2016 at 01:58:57PM -0500, Jonathon Jongsma wrote:
> since display_channel_print_stats is now static, the compiler complains
> when RED_WORKER_STAT is undefined since this function is not used:
>
> ../../server/display-channel.c:853:13: error: 'display_channel_print_stats' defined but not used [-Werror=unused-function]
Acked-by: Victor Toso <victortoso at redhat.com>
and I plan to push soon to fix the build
>
> To fix, don't define the function when RED_WORKER_STAT is undefined.
> ---
> server/display-channel.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/server/display-channel.c b/server/display-channel.c
> index 6460f57..7e9b8ef 100644
> --- a/server/display-channel.c
> +++ b/server/display-channel.c
> @@ -850,9 +850,9 @@ static bool drawable_can_stream(DisplayChannel *display, Drawable *drawable)
> return TRUE;
> }
>
> +#ifdef RED_WORKER_STAT
> static void display_channel_print_stats(DisplayChannel *display)
> {
> -#ifdef RED_WORKER_STAT
> stat_time_t total = display->add_stat.total;
> spice_info("add with shadow count %u",
> display->add_with_shadow_count);
> @@ -873,8 +873,8 @@ static void display_channel_print_stats(DisplayChannel *display)
> stat_reset(&display->add_stat);
> stat_reset(&display->exclude_stat);
> stat_reset(&display->__exclude_stat);
> -#endif
> }
> +#endif
>
> static void drawable_ref_surface_deps(DisplayChannel *display, Drawable *drawable)
> {
> --
> 2.4.11
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
More information about the Spice-devel
mailing list