Just screening Panda3D source I bumped into unreachable statements, dunno if serious (or what issue could be hidden…) but here they are :
codepanda/src/putil/bamCache.cxx(385): statement is unreachable
check_cache_size();
panda\src\downloader\chunkedStreamBuf.cxx(226): statement is unreachable
return 0;
panda\src\pipeline\threadSimpleImpl.I(41): statement is unreachable
return true;
panda\src\nativenet\socket_tcp_ssl.h(314): statement is unreachable
es=CRYPTO_thread_id();
panda/src/gobj/shader.cxx(1186): statement is unreachable
cp_report_error(p, "unrecognized parameter name");
panda/src/pgraph/shaderAttrib.cxx(630): statement is unreachable
return resfail;
Similarly, some harmless bunch of pointless comparison of unsigned integer with zero : any time (PyLong_AsUnsignedLong(param1_uint)) < 0 is tested
libexpress_igate.cxx(18701): warning #186: pointless comparison of unsigned integer with zero
if ((PyLong_AsUnsignedLong(param1_uint)) < 0 || (PyLong_AsUnsignedLong(param1_uint)) >= ((const ConstPointerToArray< int >*)local_this)->size()) {
libexpress_igate.cxx(19520): warning #186: pointless comparison of unsigned integer with zero
if ((PyLong_AsUnsignedLong(param1_uint)) < 0 || (PyLong_AsUnsignedLong(param1_uint)) >= ((const ConstPointerToArray< unsigned char >*)local_this)->size()) {
^
libexpress_igate.cxx(42209): warning #186: pointless comparison of unsigned integer with zero
if ((PyLong_AsUnsignedLong(param1_uint)) < 0 || (PyLong_AsUnsignedLong(param1_uint)) >= ((const PointerToArray< float >*)local_this)->size()) {
^
libexpress_igate.cxx(42274): warning #186: pointless comparison of unsigned integer with zero
if ((PyLong_AsUnsignedLong(param1_uint)) < 0 || (PyLong_AsUnsignedLong(param1_uint)) >= (local_this)->size()) {
… and so on for this one
and a bunch of totally harmless but pointless comparisons such as:
panda/src/nativenet/buffered_datagramconnection.h(43): pointless comparison of unsigned integer with zero
if(_active_index >= the_size || _active_index < 0)