Re: [squid-dev] splay.h replacement

2014-11-24 Thread Tsantilas Christos

On 11/21/2014 07:43 PM, Amos Jeffries wrote:

-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.


Unfortunately we are using similar checks in other places too:

 ..TRUNK/src # grep -n this *== *NULL *.cc */*.cc */*/*.cc
store.cc:1671:if (this == NULL)
auth/UserRequest.cc:127:if (this == NULL || getDenyMessage() == NULL) {

Probably used in the past to fix/prevent bugs, but I agree, it is not 
the best method...





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-
___
squid-dev mailing list
squid-dev@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-dev



___
squid-dev mailing list
squid-dev@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-dev


Re: [squid-dev] splay.h replacement

2014-11-21 Thread Amos Jeffries
-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-
___
squid-dev mailing list
squid-dev@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-dev


Re: [squid-dev] splay.h replacement

2014-11-18 Thread Tsantilas Christos

The compiler has right


On 11/18/2014 05:23 AM, Amos Jeffries wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

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)

iQEcBAEBAgAGBQJUaruvAAoJELJo5wb/XPRjEQ4IAL2tCJsN2vK4VO/sp0RX1zMv
/PPUYWUWGlU4dVhOBTHR8TQ3zrTrt+rwl+LQcOMbpPGkUMWAc9rg+y2HLk+EKiaw
sV4emS9R645O7NlZItipilnDbfQLSx82g6gbd1BWfl5vqVpkx27jttSh/0SNVnFV
B49LR9m9CcyRQaGQe5wVdwRHco2We/Kx3KB4JPNuoxjdVpBj2YDCNzRSfod++RZX
tgcjjKMaOibo3L9Fmx91zWcguzg7s0fGwwYCPn7usI6TUAeZwfv96R2sY8U3MYjc
3oiI1rq6iU5alz77uQdh4f+DSWlOplRGGeh7wz3OGWhivj3oA62sVCJFPmpCuZM=
=Fni5
-END PGP SIGNATURE-
___
squid-dev mailing list
squid-dev@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-dev



___
squid-dev mailing list
squid-dev@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-dev


[squid-dev] splay.h replacement

2014-11-17 Thread Amos Jeffries
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

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)

iQEcBAEBAgAGBQJUaruvAAoJELJo5wb/XPRjEQ4IAL2tCJsN2vK4VO/sp0RX1zMv
/PPUYWUWGlU4dVhOBTHR8TQ3zrTrt+rwl+LQcOMbpPGkUMWAc9rg+y2HLk+EKiaw
sV4emS9R645O7NlZItipilnDbfQLSx82g6gbd1BWfl5vqVpkx27jttSh/0SNVnFV
B49LR9m9CcyRQaGQe5wVdwRHco2We/Kx3KB4JPNuoxjdVpBj2YDCNzRSfod++RZX
tgcjjKMaOibo3L9Fmx91zWcguzg7s0fGwwYCPn7usI6TUAeZwfv96R2sY8U3MYjc
3oiI1rq6iU5alz77uQdh4f+DSWlOplRGGeh7wz3OGWhivj3oA62sVCJFPmpCuZM=
=Fni5
-END PGP SIGNATURE-
___
squid-dev mailing list
squid-dev@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-dev