Various fixes detected using PVS-Studio static analyzer.

- Add FIXME tags comments to some unfixed potential bugs
- Remove some checks (always false: unsigned never < 0)
- Fix some if statements based on reviews.
- Bunch of missing `else` statements
This commit is contained in:
Thaer Razeq
2017-02-23 02:28:09 -06:00
committed by REBELLIOUSX\Rebel_X
parent 0f8c6dd382
commit f50488a361
32 changed files with 41 additions and 39 deletions

View File

@ -2953,7 +2953,7 @@ uint32_t Variant::hash() const {
PoolVector<p_type>::Read rr = r.read(); \
\
for(int i = 0; i < l.size(); ++i) { \
if(! p_compare_func((lr[0]), (rr[0]))) \
if(! p_compare_func((lr[i]), (rr[i]))) \
return false; \
}\
\
@ -3065,7 +3065,7 @@ bool Variant::hash_compare(const Variant& p_variant) const {
return false;
for(int i = 0; i < l.size(); ++i) {
if(! l[0].hash_compare(r[0]))
if(! l[i].hash_compare(r[i]))
return false;
}