fix(coverity): dead code and operands don't affect result #17662

* fix(coverity/349942): structurally dead code

* fix(coverity/331396): operands don't affect result

* fix(coverity/331393): operands don't affect result

* fix(coverity/331392): operands don't affect result

* fix(coverity/331384): operands don't affect result

* fix(coverity/331374): operands don't affect result

* fix(coverity/331372): operands don't affect result

* fix(coverity/331371): operands don't affect result

* fix(coverity/331364): operands don't affect result

* fix(coverity/105585): operands don't affect result
This commit is contained in:
dundargoc
2022-03-11 15:04:48 +01:00
committed by GitHub
parent 19858288b4
commit c3a6ff6aa3
6 changed files with 8 additions and 15 deletions

View File

@@ -5664,12 +5664,10 @@ void comp_col(void)
}
}
assert(sc_col >= 0
&& INT_MIN + sc_col <= Columns
&& Columns - sc_col <= INT_MAX);
&& INT_MIN + sc_col <= Columns);
sc_col = Columns - sc_col;
assert(ru_col >= 0
&& INT_MIN + ru_col <= Columns
&& Columns - ru_col <= INT_MAX);
&& INT_MIN + ru_col <= Columns);
ru_col = Columns - ru_col;
if (sc_col <= 0) { // screen too narrow, will become a mess
sc_col = 1;