This is the mail archive of the
cygwin-patches
mailing list for the Cygwin project.
[PATCH 07/11] The address of an class always evaluates to true
- From: Peter Foley <pefoley2 at pefoley dot com>
- To: cygwin-patches at cygwin dot com
- Cc: Peter Foley <pefoley2 at pefoley dot com>
- Date: Sat, 19 Mar 2016 13:45:53 -0400
- Subject: [PATCH 07/11] The address of an class always evaluates to true
- Authentication-results: sourceware.org; auth=none
- References: <1458409557-13156-1-git-send-email-pefoley2 at pefoley dot com>
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>
---
winsup/cygwin/pinfo.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc
index 409a0b7..17bf063 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)
--
2.7.4