From: nobu.nokada@... Date: 2003-06-26T13:57:19+09:00 Subject: Re: [Patch] class.c code cleanup (rb_class_*_instance_methods) Hi, At Thu, 26 Jun 2003 13:17:12 +0900, Matthew Dempsky wrote: > > Warnings are emitted. > > Ugh, what compile flags did you set to get these warnings? They were > getting through fine when I used gcc -Wall. It depends on gcc version. $ LANG=C gcc -v Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/specs Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --host=i386-redhat-linux Thread model: posix gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5) > In your patch, recurse has the possibility of not being initialized and > it doesn't make sense to call rb_scan_args unconditionally if you're > only going to use the result and side-effects conditionally. This patch > is basically the same as yours just recurse is initialized and the > rb_scan_args() call is only done when argc is non-zero.\ Thanks, I missed it. > +#if RUBY_VERSION_CODE < 181 > + else { > + rb_warn("%s: parameter will default to 'true' as of 1.8.1", rb_id2name(rb_frame_last_func())); > + recurse = Qnil; This should be Qfalse. Qnil is true in C. -- Nobu Nakada