summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/pinfo.cc
diff options
context:
space:
mode:
authorPeter Foley <pefoley2@pefoley.com>2016-03-19 13:45:53 -0400
committerCorinna Vinschen <corinna@vinschen.de>2016-03-20 12:16:42 +0100
commit1eb7cb2553e5643395869814914ff0344ce5af51 (patch)
treeab7d53a7504abd774465d86cd5690aec8751c45e /winsup/cygwin/pinfo.cc
parent2f310e44c415de4d44c0d3258764db5120caa34f (diff)
downloadcygnal-1eb7cb2553e5643395869814914ff0344ce5af51.tar.gz
cygnal-1eb7cb2553e5643395869814914ff0344ce5af51.tar.bz2
cygnal-1eb7cb2553e5643395869814914ff0344ce5af51.zip
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>
Diffstat (limited to 'winsup/cygwin/pinfo.cc')
-rw-r--r--winsup/cygwin/pinfo.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc
index be32cfd59..23861e5eb 100644
--- a/winsup/cygwin/pinfo.cc
+++ b/winsup/cygwin/pinfo.cc
@@ -462,7 +462,7 @@ _pinfo::set_ctty (fhandler_termios *fh, int flags)
{
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);
- if (fh && &tc && (ctty <= 0 || ctty == tc.ntty) && !(flags & O_NOCTTY))
+ if (fh && (ctty <= 0 || ctty == tc.ntty) && !(flags & O_NOCTTY))
{
ctty = tc.ntty;
if (cygheap->ctty != fh->archetype)