Обсуждение: new gcc warning
Hi
I see a new warning in upstreamr/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;
^~
[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.
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
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
regards, tom lane
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
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
regards, tom lane