mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-09-07 21:28:11 +08:00
0032402: Coding Rules - eliminate msvc warning C4668 (symbol is not defined as a preprocessor macro, replacing with '0' for directive)
Make preprocessor expressions consistent with respect to guard expressions. Fixed usage of macros __QNX__, IRIX, OCCT_DEBUG, DO_INVERSE, DRAW, CHFI3D_DEB by value. Removed obsolete hack for Sun Workshop 5.0 compiler.
This commit is contained in:
@@ -211,7 +211,7 @@ public:
|
||||
myDeletable (Standard_False)
|
||||
{
|
||||
Standard_RangeError_Raise_if (theUpper < theLower, "NCollection_Array1::Create");
|
||||
#if (defined(__GNUC__) && __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
|
||||
#if (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)))
|
||||
// gcc emits -Warray-bounds warning when NCollection_Array1 is initialized
|
||||
// from local array with lower index 1 (so that (&theBegin - 1) points out of array bounds).
|
||||
// NCollection_Array1 initializes myData with a shift to avoid this shift within per-element access.
|
||||
@@ -220,7 +220,7 @@ public:
|
||||
#pragma GCC diagnostic ignored "-Warray-bounds"
|
||||
#endif
|
||||
myData = (TheItemType *) &theBegin - theLower;
|
||||
#if (defined(__GNUC__) && __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
|
||||
#if (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)))
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user