new gcc warning

Started by Pavel Stehuleover 9 years ago5 messageshackers
Jump to latest
#1Pavel Stehule
pavel.stehule@gmail.com

Hi

I see a new warning in upstream

r/include/libxml2 -c -o path.o path.c
path.c: In function ‘has_drive_prefix’:
path.c:89:26: warning: self-comparison always evaluates to false
[-Wtautological-compare]
return skip_drive(path) != path;
^~
Regards

[pavel@nemesis postgresql]$ gcc --version
gcc (GCC) 6.1.1 20160621 (Red Hat 6.1.1-3)
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Regards

Pavel

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Pavel Stehule (#1)
Re: new gcc warning

Pavel Stehule <pavel.stehule@gmail.com> writes:

I see a new warning in upstream

r/include/libxml2 -c -o path.o path.c
path.c: In function ‘has_drive_prefix’:
path.c:89:26: warning: self-comparison always evaluates to false
[-Wtautological-compare]
return skip_drive(path) != path;
^~

That should have gone away in commit a2fd62dd5. What version are
you looking at?

regards, tom lane

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#3Pavel Stehule
pavel.stehule@gmail.com
In reply to: Tom Lane (#2)
Re: new gcc warning

2016-09-01 14:31 GMT+02:00 Tom Lane <tgl@sss.pgh.pa.us>:

Pavel Stehule <pavel.stehule@gmail.com> writes:

I see a new warning in upstream

r/include/libxml2 -c -o path.o path.c
path.c: In function ‘has_drive_prefix’:
path.c:89:26: warning: self-comparison always evaluates to false
[-Wtautological-compare]
return skip_drive(path) != path;
^~

That should have gone away in commit a2fd62dd5. What version are
you looking at?

I am checking 9.5 branch and I cannot to find this commit there

Regards

Pavel

Show quoted text

regards, tom lane

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Pavel Stehule (#3)
Re: new gcc warning

Pavel Stehule <pavel.stehule@gmail.com> writes:

2016-09-01 14:31 GMT+02:00 Tom Lane <tgl@sss.pgh.pa.us>:

That should have gone away in commit a2fd62dd5. What version are
you looking at?

I am checking 9.5 branch and I cannot to find this commit there

Hmm ... it wasn't back-patched, evidently. We don't have a clear
project policy on whether to back-patch changes that are only meant
to silence useless warnings, but it seems reasonable to push this
one, since gcc 6 is getting more widespread.

regards, tom lane

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#5Pavel Stehule
pavel.stehule@gmail.com
In reply to: Tom Lane (#4)
Re: new gcc warning

2016-09-01 18:40 GMT+02:00 Tom Lane <tgl@sss.pgh.pa.us>:

Pavel Stehule <pavel.stehule@gmail.com> writes:

2016-09-01 14:31 GMT+02:00 Tom Lane <tgl@sss.pgh.pa.us>:

That should have gone away in commit a2fd62dd5. What version are
you looking at?

I am checking 9.5 branch and I cannot to find this commit there

Hmm ... it wasn't back-patched, evidently. We don't have a clear
project policy on whether to back-patch changes that are only meant
to silence useless warnings, but it seems reasonable to push this
one, since gcc 6 is getting more widespread.

Thank you

Pavel

Show quoted text

regards, tom lane