On Fri, Dec 05, 2008 at 05:29:24PM -0600, Craig A. Berry wrote: > On Fri, Dec 5, 2008 at 3:32 PM, Chip Salzenberg <chip@pobox.com> wrote: > > @@ -2875,8 +2875,8 @@ Perl_my_pclose(pTHX_ PerlIO *ptr) > > return my_syspclose(ptr); > > } > > #endif > > - if ((close_failed = (PerlIO_close(ptr) == EOF))) > > - SAVE_ERRNO; > > + close_failed = (PerlIO_close(ptr) == EOF); > > + SAVE_ERRNO; > > Is that line supposed to be > if (close_failed) SAVE_ERRNO; > ? Or do you now want to save errno regardless of whether the close failed? The latter. Gcc warns, erroneously, when the save is conditional. It can't figure out that the restore can only happen if the save already did. -- Chip Salzenberg twitter:chipsalz "UTOPIA PLANITIA IS IN ORBIT is the new HAN SHOT FIRST" - Crisper Than ThouThread Previous | Thread Next