Обсуждение: new gcc warning

Поиск
Список
Период
Сортировка

new gcc warning

От
Pavel Stehule
Дата:
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

Re: new gcc warning

От
Tom Lane
Дата:
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



Re: new gcc warning

От
Pavel Stehule
Дата:


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

Re: new gcc warning

От
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



Re: new gcc warning

От
Pavel Stehule
Дата:


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