unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* Avoid warnings in sockets.c when HAVE_SIN6_SCOPE_ID is unavailable
@ 2016-07-16 17:16 Eli Zaretskii
  2016-07-22  7:16 ` Eli Zaretskii
  2016-07-23 20:55 ` Andy Wingo
  0 siblings, 2 replies; 6+ messages in thread
From: Eli Zaretskii @ 2016-07-16 17:16 UTC (permalink / raw)
  To: guile-devel

    CC       libguile_2.0_la-socket.lo
  socket.c: In function 'scm_fill_sockaddr':
  socket.c:747:16: warning: variable 'scope_id' set but not used [-Wunused-but-set-variable]
    unsigned long scope_id = 0;
		  ^

The patch to avoid this warning is below.  OK to commit?

--- libguile/socket.c~0	2016-01-02 16:24:55.000000000 +0200
+++ libguile/socket.c	2016-07-15 19:17:40.023250000 +0300
@@ -744,7 +744,9 @@ scm_fill_sockaddr (int fam, SCM address,
 	int port;
 	struct sockaddr_in6 *soka;
 	unsigned long flowinfo = 0;
+#ifdef HAVE_SIN6_SCOPE_ID
 	unsigned long scope_id = 0;
+#endif
 
 	SCM_VALIDATE_CONS (which_arg + 1, *args);
 	port = scm_to_int (SCM_CAR (*args));
@@ -755,8 +757,10 @@ scm_fill_sockaddr (int fam, SCM address,
 	    *args = SCM_CDR (*args);
 	    if (scm_is_pair (*args))
 	      {
+#ifdef HAVE_SIN6_SCOPE_ID
 		SCM_VALIDATE_ULONG_COPY (which_arg + 3, SCM_CAR (*args),
 					 scope_id);
+#endif
 		*args = SCM_CDR (*args);
 	      }
 	  }



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-08-13  7:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-16 17:16 Avoid warnings in sockets.c when HAVE_SIN6_SCOPE_ID is unavailable Eli Zaretskii
2016-07-22  7:16 ` Eli Zaretskii
2016-08-10  6:49   ` Mark H Weaver
2016-08-13  7:17     ` Eli Zaretskii
2016-07-23 20:55 ` Andy Wingo
2016-07-24 14:35   ` Eli Zaretskii

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).