[Spice-devel] [PATCH] red-stream: fix build without SASL

Frediano Ziglio fziglio at redhat.com
Thu Nov 23 16:55:20 UTC 2017


> 
> put red_stream_disable_writev in an #ifdef HAVE_SASL block.
> red_stream_disable_writev is only called from functions
> that are already in an #ifdef HAVE_SASL block.
> 
> Currently when building with SASL disabled, I get:
>   CC       red-stream.lo
> red-stream.c:441:13: error: 'red_stream_disable_writev'
>            defined but not used [-Werror=unused-function]
> 
> Signed-off-by: Uri Lublin <uril at redhat.com>
> ---
>  server/red-stream.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/server/red-stream.c b/server/red-stream.c
> index af722f2ab..45e92a57b 100644
> --- a/server/red-stream.c
> +++ b/server/red-stream.c
> @@ -438,10 +438,12 @@ bool red_stream_is_ssl(RedStream *stream)
>      return (stream->priv->ssl != NULL);
>  }
>  
> +#if HAVE_SASL
>  static void red_stream_disable_writev(RedStream *stream)
>  {
>      stream->priv->writev = NULL;
>  }
> +#endif
>  
>  RedStreamSslStatus red_stream_ssl_accept(RedStream *stream)
>  {

This can be solved also using a "static inline" function or moving the
definition inside the "#if HAVE_SASL" block.

Otherwise,
Acked-by: Frediano Ziglio <fziglio at redhat.com>

OT: Maybe we could add "--without-sasl" as an option to one of the
Gitlab build.

Frediano


More information about the Spice-devel mailing list