Tautological comparison in gcc 6.1.1

Michael Adam obnox at samba.org
Wed Jul 13 00:01:58 UTC 2016


On 2016-07-13 at 00:15 +0200, Michael Adam wrote:
> 
> Attached are patches that cover all definitions of DLIST_ADD_END
> as above. We could add those with your authorship, amitay.
> 
> These are not the only problems encountered with gcc6.
> 
> Continuing now ...

One problem is that we have quite a number of
uses of DLIST_REMOVE in the form of

  DLIST_REMOVE(p, p)

which will lead to a comparison if ((p) == (p))...

This is a completely valid pattern.
Not sure yet how to fix this in a conceptually good way.

Cheers - Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20160713/6e34336b/signature.sig>


More information about the samba-technical mailing list