This is the mail archive of the
cygwin-patches
mailing list for the Cygwin project.
Re: [PATCH] Fix maybe-used-uninitialised warning.
- From: Corinna Vinschen <corinna-cygwin at cygwin dot com>
- To: cygwin-patches at cygwin dot com
- Date: Sat, 9 Jan 2010 14:35:53 +0100
- Subject: Re: [PATCH] Fix maybe-used-uninitialised warning.
- References: <4B4868F7.1000100@gmail.com>
- Reply-to: cygwin-patches at cygwin dot com
On Jan 9 11:31, Dave Korn wrote:
>
> Hi,
>
> Here are two small fixes shown up by more sensitive warnings in gcc-4.5.0.
> In hookapi.cc, it notices that the loop might not run even once; in
> fhandler_tty, it appears to miss that the loops can never exit. That probably
> needs fixing upstream (but it may be some odd artifact of C++ language rules,
> since it only happens there, not in plain C; something to do with exceptional
> exits, maybe), but until then it seemed harmless to add a trivial return zero;
> it'll only add a handful of bytes to the dll. (I tested attribute noreturn
> and it didn't help.)
>
> winsup/cygwin/ChangeLog:
>
> * hookapi.cc (hook_or_detect_cygwin): Initialise i earlier to avoid
> warning.
>
> OK?
>
> winsup/cygwin/ChangeLog:
>
> * fhandler_tty.cc (process_input): Add redundant final return to
> silence (bogus?) warning.
>
> OK, or wait to see what upstream says about it?
Looks ok to me, independently of upstream. It's just an elaborate
no-op. Chris?
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Red Hat