nobu.nokada / softhome.net wrote:
> 
> Hi,
> 
> At Tue, 9 Dec 2003 02:43:22 +0900,
> Daniel Berger wrote:
> > error.c:645: warning: `init_syserr' declared `static' but never defined
> >
> > file.c:329: warning: unsigned int format, different type arg (arg 3)
> >
> > gc.c:582: warning: unused variable `tmp'
> > gc.c:658: warning: unused variable `ret'
> >
> > bigdecimal.c:106: warning: int format, different type arg (arg 3)
> >
> > curses.c:665: warning: `curses_ungetmouse' defined but not used
> > curses.c:1264: warning: `window_bkgdset' defined but not used
> > curses.c:1276: warning: `window_bkgd' defined but not used
> > curses.c:1289: warning: `window_getbkgd' defined but not used
> >
> > dl.c: In function `dlsizeof':
> > dl.c:167: warning: subscript has type `char'
> >
> > iconv.c: In function `iconv_convert':
> > iconv.c:429: warning: int format, different type arg (arg 3)
> > iconv.c: In function `Init_iconv':
> > iconv.c:839: warning: unused variable `metaclass'
> >
> > pty.c: In function `getDevice':
> > pty.c:343: warning: unused variable `p'
> > pty.c:345: warning: unused variable `MasterName'
> > pty.c: At top level:
> > pty.c:89: warning: `MasterDevice' defined but not used
> > pty.c:90: warning: `SlaveDevice' defined but not used
> > pty.c:91: warning: `deviceNo' defined but not used
> > pty.c:404: warning: `freeDevice' defined but not used
> >
> > socket.c: In function `port_str':
> > socket.c:599: warning: int format, different type arg (arg 4)
> > socket.c: In function `sock_s_getaddrinfo':
> > socket.c:2109: warning: int format, different type arg (arg 4)
> > socket.c: In function `sock_s_getnameinfo':
> > socket.c:2228: warning: int format, different type arg (arg 4)
> >
> > rubyext.c: In function `rb_syck_compile':
> > rubyext.c:96: warning: implicit declaration of function `syck_parser_assign_io'
> 
> Does following patch clean these warnings?

It cleaned most of them, but some remain:

The file.c warning still (strangely) remains:

file.c: In function `rb_stat_inspect':
file.c:329: warning: unsigned int format, different type arg (arg 3)

From window_bkgd in curses.c (as opposed to window_bkgdset before):

curses.c:1278: warning: `window_bkgd' defined but not used
curses.c:1291: warning: `window_getbkgd' defined but not used

Should I wrap that function in a "#ifdef USE_COLOR" as well?

From dl.c:

dl.c:167: warning: subscript has type `char'
dl.c:169: warning: subscript has type `char'

> 
> > eval.c:9032: warning: `limit' might be used uninitialized in this function
> >
> > process.c: In function `rb_syswait':
> > process.c:909: warning: `hfunc' might be used uninitialized in this function
> > process.c:909: warning: `qfunc' might be used uninitialized in this function
> > process.c:909: warning: `ifunc' might be used uninitialized in this function
> >
> > socket.c: In function `ipaddr':
> > socket.c:660: warning: `addr1' might be used uninitialized in this function
> > socket.c: In function `init_inetsock_internal':
> > socket.c:897: warning: `syscall' might be used uninitialized in this function
> 
> These are used conditionally.  As for the last one, I guess
> `status' should be warned rather than it.

Ok.

> 
> > sym.c:365: warning: unused variable `guard'
> 
> I think this must be a "volatile pointer" instead of a "pointer
> to volatile".
> 
> > numeric.c:791: warning: implicit declaration of function `finite'
> 
> Does math.h on Solaris lack finite()?

Looks like it's defined in ieeefp.h on sun.  I added

#if defined(sun)
#include <ieeefp.h>
#endif

That seemed to work.

> 
> > parse.y:4443: warning: `nodeline' defined but not used
> 
> This and nodetype() are for debug use.

Ok.

> 
> > socket.c: In function `bsock_getsockopt':
> > socket.c:317: warning: implicit declaration of function `alloca'
> 
> ALLOCA_N() macro is used in many place, why is it warned only
> here?

Actually, that warning shows up in many places, but that warning has
been brought up on the list separately, so I didn't want to list them
all again.

> 
> > bigdecimal.c:1582: warning: `VpIsNegDoubleZero' defined but not used
> > bigdecimal.c:3573: warning: `VpItoV' defined but not used
> 
> I'm not sure whether these are planned to use or not.

Ok.

> 
> > rubyext.c: In function `syck_set_model':
> > rubyext.c:681: warning: implicit declaration of function `syck_parser_set_input_type'
> 
> I suspect this should be declared in syck.h, but not sure.
> Since other syck stuff are tool-generated, only _why can fix
> them.

Ok.

<snip>

Hope that helps.

Regards,

Dan

PS - Do you care about this warning? "warning: suggest parentheses
around assignment used as truth value".  If not, do you happen to know
the option to disable that warning?