The address of an class always evaluates to true

winsup/cygwin/pinfo.cc:465:14: error: the compiler can assume that the
address of 'tc' will always evaluate to 'true' [-Werror=address]

winsup/cygwin/ChangeLog
* pinfo.cc (_pinfo::set_ctty): remove always true check.

Signed-off-by: Peter Foley <pefoley2@pefoley.com>
This commit is contained in:
Peter Foley 2016-03-19 13:45:53 -04:00 committed by Corinna Vinschen
parent 2f310e44c4
commit 1eb7cb2553
1 changed files with 1 additions and 1 deletions

View File

@ -462,7 +462,7 @@ _pinfo::set_ctty (fhandler_termios *fh, int flags)
{ {
tty_min& tc = *fh->tc (); tty_min& tc = *fh->tc ();
debug_printf ("old %s, ctty device number %y, tc.ntty device number %y flags & O_NOCTTY %y", __ctty (), ctty, tc.ntty, flags & O_NOCTTY); debug_printf ("old %s, ctty device number %y, tc.ntty device number %y flags & O_NOCTTY %y", __ctty (), ctty, tc.ntty, flags & O_NOCTTY);
if (fh && &tc && (ctty <= 0 || ctty == tc.ntty) && !(flags & O_NOCTTY)) if (fh && (ctty <= 0 || ctty == tc.ntty) && !(flags & O_NOCTTY))
{ {
ctty = tc.ntty; ctty = tc.ntty;
if (cygheap->ctty != fh->archetype) if (cygheap->ctty != fh->archetype)