[squid-dev] splay.h replacement

Amos Jeffries squid3 at treenet.co.nz
Fri Nov 21 17:43:29 UTC 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 19/11/2014 4:08 a.m., Tsantilas Christos wrote:
> The compiler has right....
> 

I know the cimpilers right about it being garbage. Its just the code
looks like there are things in those templates which are wrongly
depending on the objects being NULL pointers for certain causes.
splay.h needs a serious revamp.


I've gone through now and dropped all the if() and asserts depending
on this==NULL or this!=NULL conditionals. Will apply that when clang
3.5 confirms teh build works.

Amos

> 
> On 11/18/2014 05:23 AM, Amos Jeffries wrote:
>> Y'all may have noticed the clang 3.5 errors.
>> 
>> lib/MemPoolChunked.cc:370:10: error: 'this' pointer cannot be
>> null in well-defined C++ code; pointer may be assumed to always
>> convert to true [-Werror,-Wundefined-bool-conversion]
>> 
>> include/splay.h:228:9: error: 'this' pointer cannot be null in 
>> well-defined C++ code; comparison may be assumed to always
>> evaluate to false [-Werror,-Wtautological-undefined-compare]
>> 
>> include/splay.h:198:9: error: 'this' pointer cannot be null in 
>> well-defined C++ code; comparison may be assumed to always
>> evaluate to false [-Werror,-Wtautological-undefined-compare]
>> 
>> include/splay.h:167:9: error: 'this' pointer cannot be null in 
>> well-defined C++ code; comparison may be assumed to always
>> evaluate to false [-Werror,-Wtautological-undefined-compare]
>> 
>> include/splay.h:228:9: error: 'this' pointer cannot be null in 
>> well-defined C++ code; comparison may be assumed to always
>> evaluate to false [-Werror,-Wtautological-undefined-compare]
>> 
>> 
>> Anyone in a position to update the splay tree code so it stops 
>> depending on NULL pointer dereferences having meaning?
>> 
>> It is mandatory change for continued FreeBSD support.
>> 
>> Amos


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (MingW32)

iQEcBAEBAgAGBQJUb3m7AAoJELJo5wb/XPRjdTsIANox6wcjNevn7GJ8QfjXlz/7
kLFgo3j8YRbvhiPhJVkXH53J2o0RppanD3J6+mHTyD/J44X3bv8zk21xZBoyvvPB
d8TUpZcxW6MHnUu4IVkj0KC9D3atgVOOG9lluJZ3QXy+rIGLs3N3zBl/TBGwZiSL
b3FmW4x6epp+ifUsL8p0MJ9yGTALWrCA4XSo0+ZmH3s5q35vO9Qye4N7IDoCsAZV
mUeY4v/vn3RhynFYdRmfVSst+U8X2vY0o+8l4JTsw5n/mkYXxdT/+m6yK1YsEvUt
a3dvabvmceB6Gz6+D9ru/gIxg1Z15UpfJfzP6oU/Zz+/INHtaZiz/pBcJCojHR0=
=L7FS
-----END PGP SIGNATURE-----


More information about the squid-dev mailing list