Re: Compilation warnings in net_db.c

2016-07-16 Thread Eli Zaretskii
> From: Andy Wingo 
> Cc: guile-devel@gnu.org
> Date: Sat, 16 Jul 2016 10:53:37 +0200
> 
> >net_db.c:454:20: warning: 'sym_ai_passive' defined but not used 
> > [-Wunused-variable]
> > SCM_VARIABLE_INIT (sym_ai_passive, "AI_PASSIVE",
> >^
> >../libguile/snarf.h:82:29: note: in definition of macro 'SCM_SNARF_HERE'
> > #  define SCM_SNARF_HERE(X) X
> > ^
> >net_db.c:454:1: note: in expansion of macro 'SCM_VARIABLE_INIT'
> > SCM_VARIABLE_INIT (sym_ai_passive, "AI_PASSIVE",
> > ^
> >
> > AFAICT, these SCM_VARIABLE_INIT calls wind up declaring static
> > variables that are not used in net_db.c.  Is that what's supposed to
> > happen, or do I need to look more into this?  Do people get these
> > warnings on Posix platforms?
> 
> Oddly I don't get these warnings, but perhaps I should.

Which version of GCC do you use?  I have 5.3.0 here, and its quite
picky, given the warning options we use.

> I reworked this file to not create these variables.  Thanks for the
> report :)

Thanks.



Re: Compilation warnings in net_db.c

2016-07-16 Thread Andy Wingo
Hi,

On Fri 15 Jul 2016 21:23, Eli Zaretskii  writes:

> While compiling net_db.c from Guile 2.0.12 with MinGW, I get a bunch
> of warnings such as this one:
>
>net_db.c:454:20: warning: 'sym_ai_passive' defined but not used 
> [-Wunused-variable]
> SCM_VARIABLE_INIT (sym_ai_passive, "AI_PASSIVE",
>  ^
>../libguile/snarf.h:82:29: note: in definition of macro 'SCM_SNARF_HERE'
> #  define SCM_SNARF_HERE(X) X
>   ^
>net_db.c:454:1: note: in expansion of macro 'SCM_VARIABLE_INIT'
> SCM_VARIABLE_INIT (sym_ai_passive, "AI_PASSIVE",
> ^
>
> AFAICT, these SCM_VARIABLE_INIT calls wind up declaring static
> variables that are not used in net_db.c.  Is that what's supposed to
> happen, or do I need to look more into this?  Do people get these
> warnings on Posix platforms?

Oddly I don't get these warnings, but perhaps I should.  I reworked this
file to not create these variables.  Thanks for the report :)

Andy



Compilation warnings in net_db.c

2016-07-15 Thread Eli Zaretskii
While compiling net_db.c from Guile 2.0.12 with MinGW, I get a bunch
of warnings such as this one:

   net_db.c:454:20: warning: 'sym_ai_passive' defined but not used 
[-Wunused-variable]
SCM_VARIABLE_INIT (sym_ai_passive, "AI_PASSIVE",
   ^
   ../libguile/snarf.h:82:29: note: in definition of macro 'SCM_SNARF_HERE'
#  define SCM_SNARF_HERE(X) X
^
   net_db.c:454:1: note: in expansion of macro 'SCM_VARIABLE_INIT'
SCM_VARIABLE_INIT (sym_ai_passive, "AI_PASSIVE",
^

AFAICT, these SCM_VARIABLE_INIT calls wind up declaring static
variables that are not used in net_db.c.  Is that what's supposed to
happen, or do I need to look more into this?  Do people get these
warnings on Posix platforms?