[PATCH libICE 2/2] iceauth.c: FIX warning: unused variable 'ret' in 'arc4random_buf'

Alan Coopersmith alan.coopersmith at oracle.com
Sun Mar 25 06:53:06 UTC 2018


Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>

On 09/ 7/17 09:52 AM, walter harms wrote:
> commit ff5e59f32255913bb1cdf51441b98c9107ae165b left ret outside the #if
> causing a gcc warnung:
> 
>  In function 'arc4random_buf':
>  iceauth.c:89:13: warning: unused variable 'ret' [-Wunused-variable]
> 
> fixed by moving  #if 1 up
> 
> 
> Signed-off-by:  Walter Harms <wharms at bfs.de>
> 
> ---
>  src/iceauth.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/iceauth.c b/src/iceauth.c
> index de4785b..7770b7f 100644
> --- a/src/iceauth.c
> +++ b/src/iceauth.c
> @@ -86,9 +86,9 @@ arc4random_buf (
>  	int len
>  )
>  {
> +#if HAVE_GETENTROPY
>      int	    ret;
> 
> -#if HAVE_GETENTROPY
>      /* weak emulation of arc4random through the entropy libc */
>      ret = getentropy (auth, len);
>      if (ret == 0)
> 


-- 
	-Alan Coopersmith-               alan.coopersmith at oracle.com
	 Oracle Solaris Engineering - https://blogs.oracle.com/alanc


More information about the xorg-devel mailing list