mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-04 13:13:25 +03:00
0023947: Eliminate trivial compiler warnings in MSVC++ with warning level 4
Fix first subset of warnings (about 100) - while(1) and similar constructs replaced by for(;;) - some uninitialized variables corrected Got rid of Warning C4189: local variable is initialised but not referenced Corrected mistakes after getting rid of C4189 compiler warning Corrected some mistakes that led to compiling errors Fixed test case because of improvement message - removed unnecessary TODO. Small fix: tabs have been replaced with whitespaces. Added TODO for Windows platform removed last TODO Corrected mistakes, returned some #ifdef DEB code, fixed test case . Restoring a few places which have been modified too much Small grammar fix Deleted unnecessary puts in bugs/end
This commit is contained in:
@@ -35,7 +35,7 @@ extern Standard_Integer TColStd_intMapNode_findNext (const TColStd_intMapNode *,
|
||||
TColStd_MapIteratorOfPackedMapOfInteger::TColStd_MapIteratorOfPackedMapOfInteger
|
||||
(const TColStd_PackedMapOfInteger& theMap)
|
||||
: TCollection_BasicMapIterator (theMap),
|
||||
myIntMask (~0)
|
||||
myIntMask (~0U)
|
||||
{
|
||||
if (myNode) {
|
||||
const TColStd_intMapNode * aNode =
|
||||
@@ -54,7 +54,7 @@ void TColStd_MapIteratorOfPackedMapOfInteger::Initialize
|
||||
(const TColStd_PackedMapOfInteger& theMap)
|
||||
{
|
||||
TCollection_BasicMapIterator::Initialize (theMap);
|
||||
myIntMask = ~0;
|
||||
myIntMask = ~0U;
|
||||
if (myNode) {
|
||||
const TColStd_intMapNode * aNode =
|
||||
reinterpret_cast <const TColStd_intMapNode *>(myNode);
|
||||
@@ -70,7 +70,7 @@ void TColStd_MapIteratorOfPackedMapOfInteger::Initialize
|
||||
void TColStd_MapIteratorOfPackedMapOfInteger::Reset ()
|
||||
{
|
||||
TCollection_BasicMapIterator::Reset();
|
||||
myIntMask = ~0;
|
||||
myIntMask = ~0U;
|
||||
if (myNode) {
|
||||
const TColStd_intMapNode * aNode =
|
||||
reinterpret_cast <const TColStd_intMapNode *>(myNode);
|
||||
|
@@ -193,9 +193,9 @@ Standard_Integer TColStd_intMapNode_findNext (const TColStd_intMapNode* theNode,
|
||||
unsigned int val = theNode->myData & theMask;
|
||||
int nZeros (0);
|
||||
if (val == 0)
|
||||
theMask = ~0; // void, nothing to do
|
||||
theMask = ~0U; // void, nothing to do
|
||||
else{
|
||||
unsigned int aMask = ~0;
|
||||
unsigned int aMask = ~0U;
|
||||
if ((val & 0x0000ffff) == 0) {
|
||||
aMask = 0xffff0000;
|
||||
nZeros = 16;
|
||||
@@ -237,9 +237,9 @@ Standard_Integer TColStd_intMapNode_findPrev (const TColStd_intMapNode* theNode,
|
||||
unsigned int val = theNode->myData & theMask;
|
||||
int nZeros (0);
|
||||
if (val == 0)
|
||||
theMask = ~0; // void, nothing to do
|
||||
theMask = ~0U; // void, nothing to do
|
||||
else {
|
||||
unsigned int aMask = ~0;
|
||||
unsigned int aMask = ~0U;
|
||||
if ((val & 0xffff0000) == 0) {
|
||||
aMask = 0x0000ffff;
|
||||
nZeros = 16;
|
||||
@@ -647,7 +647,7 @@ Standard_Boolean TColStd_PackedMapOfInteger::Unite(const TColStd_PackedMapOfInte
|
||||
while (p1) {
|
||||
if (p1->IsEqual(aKeyInt)) {
|
||||
const size_t anOldPop = p1->NbValues();
|
||||
Standard_Integer newData = p1->Data() | p2->Data();
|
||||
unsigned int newData = p1->Data() | p2->Data();
|
||||
if ( newData != p1->Data() ) {
|
||||
p1->ChangeData() = newData;
|
||||
aNewExtent = aNewExtent - anOldPop +
|
||||
|
Reference in New Issue
Block a user