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

walter harms wharms at bfs.de
Thu Sep 7 16:52:13 UTC 2017


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)
-- 
2.1.4



More information about the xorg-devel mailing list