From 6d1a5d3a0caeb8bd542c6af7e1cc3ee4bcb29914 Mon Sep 17 00:00:00 2001 From: Pawel Date: Thu, 26 Jul 2012 13:06:55 +0200 Subject: [PATCH] 0023356: Suspicious assignment inside the condition expression of 'if' operator. Changed the assignments in the if-clauses to comparisons. --- src/QABugs/QABugs_11.cxx | 6 +++--- .../QANewBRepNaming_BooleanOperationFeat.cxx | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/QABugs/QABugs_11.cxx b/src/QABugs/QABugs_11.cxx index 96310782cc..1346e3f4ac 100644 --- a/src/QABugs/QABugs_11.cxx +++ b/src/QABugs/QABugs_11.cxx @@ -724,7 +724,7 @@ static Standard_Integer OCC297 (Draw_Interpretor& di,Standard_Integer /*argc*/, static Standard_Integer OCC305 (Draw_Interpretor& di,Standard_Integer argc, const char ** argv ) { - if (argc =! 2) + if (argc != 2) { di <<"Usage : " << argv[0] << " file"<<"\n"; return 1; @@ -1895,7 +1895,7 @@ static Standard_Integer OCC909 (Draw_Interpretor& di, Standard_Integer argc, con //======================================================================= static Standard_Integer OCC921 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv) { - if (argc =! 2) + if (argc != 2) { di <<"Usage : " << argv[0] << " face"<<"\n"; return 1; @@ -1918,7 +1918,7 @@ static Standard_Integer OCC921 (Draw_Interpretor& di, Standard_Integer argc, con //======================================================================= static Standard_Integer OCC902(Draw_Interpretor& di, Standard_Integer argc, const char ** argv) { - if (argc =! 2) + if (argc != 2) { di <<"Usage : " << argv[0] << " expression"<<"\n"; return 1; diff --git a/src/QANewBRepNaming/QANewBRepNaming_BooleanOperationFeat.cxx b/src/QANewBRepNaming/QANewBRepNaming_BooleanOperationFeat.cxx index c768639559..bb7195ef43 100755 --- a/src/QANewBRepNaming/QANewBRepNaming_BooleanOperationFeat.cxx +++ b/src/QANewBRepNaming/QANewBRepNaming_BooleanOperationFeat.cxx @@ -1103,7 +1103,7 @@ static void SortEdges5 (const TopTools_Array1OfShape& theArS, const TColgp_Array else {aDP = aDP3; aCP = theArP.Value(i4);} //i4, i5 - group of 2 edges at the bottom if(!IsDirectionPositive(theAx, aDP, aCP)) {//first must be positive direction Standard_Integer aN; - if(aTop = 2) { + if(aTop == 2) { // change i1 <=> i2 aN = i2; i2 = i1; i1 = aN; @@ -1126,7 +1126,7 @@ static void SortEdges5 (const TopTools_Array1OfShape& theArS, const TColgp_Array if(!IsDirectionPositive(theAx, aDP, aCP)) {//first must be positive direction Standard_Integer aN; - if(aTop = 2) { + if(aTop == 2) { // change i3 <=> i5 aN = i5; i5 = i3; i3 = aN;