[Spice-devel] [PATCH spice-gtk] build-sys: fix 'Only <spice-client.h> can be included directly' warning

Fabiano Fidêncio fidencio at redhat.com
Tue Mar 15 16:16:06 UTC 2016


On Tue, Mar 15, 2016 at 12:39 PM, Marc-André Lureau
<marcandre.lureau at gmail.com> wrote:
> Tests should be allowed to include directly private headers. Set
> __SPICE_CLIENT_H_INSIDE__ where necessary or include spice-client.h
> where possible.
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau at gmail.com>
> ---
>  tests/session.c | 4 +---
>  tests/util.c    | 1 +
>  2 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/tests/session.c b/tests/session.c
> index feee3db..d065b60 100644
> --- a/tests/session.c
> +++ b/tests/session.c
> @@ -1,6 +1,4 @@
> -#include <glib.h>
> -
> -#include "spice-session.h"
> +#include <spice-client.h>
>
>  static void test_session_uri(void)
>  {
> diff --git a/tests/util.c b/tests/util.c
> index b9b9535..dcc9770 100644
> --- a/tests/util.c
> +++ b/tests/util.c
> @@ -3,6 +3,7 @@
>  #include <string.h>
>  #include <stdlib.h>
>
> +#define __SPICE_CLIENT_H_INSIDE__
>  #include "spice-util-priv.h"
>
>  enum {
> --
> 2.5.0
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel

Acked-by: Fabiano Fidêncio <fidencio at redhat.com>


More information about the Spice-devel mailing list