Disable MSVC warnings on all MSVC

Fixes the build on MSVC 2017 (and probably MSVC 2015)
pull/3336/head
RichardTea 2020-07-17 14:58:51 +01:00
parent c527a33aa8
commit 9cad10a995
7 changed files with 678 additions and 668 deletions

View File

@ -321,9 +321,10 @@ public:
struct Face : public FaceWithSmoothingGroup { struct Face : public FaceWithSmoothingGroup {
}; };
#if _MSC_VER > 1920 #ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable : 4315) #pragma warning(disable : 4315)
#endif #endif // _MSC_VER
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
/** Helper structure representing a texture */ /** Helper structure representing a texture */
@ -412,6 +413,10 @@ struct Texture {
#include <assimp/Compiler/poppack1.h> #include <assimp/Compiler/poppack1.h>
#ifdef _MSC_VER
#pragma warning(pop)
#endif // _MSC_VER
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
/** Helper structure representing a 3ds material */ /** Helper structure representing a 3ds material */
struct Material { struct Material {

View File

@ -45,9 +45,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "AssetLib/Step/STEPFile.h" #include "AssetLib/Step/STEPFile.h"
#if _MSC_VER > 1920 #ifdef _MSC_VER
# pragma warning(push)
# pragma warning( disable : 4512 ) # pragma warning( disable : 4512 )
#endif // _WIN32 #endif // _MSC_VER
namespace Assimp { namespace Assimp {
namespace IFC { namespace IFC {
@ -4372,4 +4373,8 @@ namespace STEP {
} //! STEP } //! STEP
} //! Assimp } //! Assimp
#ifdef _MSC_VER
# pragma warning(pop)
#endif // _MSC_VER
#endif // INCLUDED_IFC_READER_GEN_H #endif // INCLUDED_IFC_READER_GEN_H

View File

@ -101,13 +101,13 @@ typedef uint16_t M3D_INDEX;
#define _register #define _register
#endif #endif
#if _MSC_VER > 1920 #ifdef _MSC_VER
# pragma warning(push) # pragma warning(push)
# pragma warning(disable : 4100 4127 4189 4505 4244 4403 4701 4703) # pragma warning(disable : 4100 4127 4189 4505 4244 4403 4701 4703)
# if (_MSC_VER > 1800 ) # if (_MSC_VER > 1800 )
# pragma warning(disable : 5573 5744) # pragma warning(disable : 5573 5744)
# endif # endif
#endif // _WIN32 #endif // _MSC_VER
/*** File format structures ***/ /*** File format structures ***/
@ -5889,7 +5889,7 @@ unsigned char *m3d_save(m3d_t *model, int quality, int flags, unsigned int *size
} }
#endif #endif
#endif #endif /* M3D_IMPLEMENTATION */
#ifdef __cplusplus #ifdef __cplusplus
} }
@ -6147,11 +6147,11 @@ public:
#endif /* impl */ #endif /* impl */
} // namespace M3D } // namespace M3D
#ifdef _WIN32 #endif /* M3D_CPPWRAPPER */
# pragma warning(pop)
#endif // _WIN32
#endif #ifdef _MSC_VER
# pragma warning(pop)
#endif /* _MSC_VER */
#endif /* __cplusplus */ #endif /* __cplusplus */

View File

@ -68,9 +68,9 @@ namespace Assimp {
namespace MDL { namespace MDL {
namespace HalfLife { namespace HalfLife {
#if _MSC_VER > 1920 #ifdef _MSC_VER
# pragma warning(disable : 4706) # pragma warning(disable : 4706)
#endif // _WIN32 #endif // _MSC_VER
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
HL1MDLLoader::HL1MDLLoader( HL1MDLLoader::HL1MDLLoader(

View File

@ -54,10 +54,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <assimp/DefaultLogger.hpp> #include <assimp/DefaultLogger.hpp>
#if _MSC_VER > 1920 #ifdef _MSC_VER
# pragma warning(push) # pragma warning(push)
# pragma warning(disable : 4127 4456 4245 4512 ) # pragma warning(disable : 4127 4456 4245 4512 )
#endif // _WIN32 #endif // _MSC_VER
// //
#if _MSC_VER > 1500 || (defined __GNUC___) #if _MSC_VER > 1500 || (defined __GNUC___)
@ -960,9 +960,9 @@ private:
const EXPRESS::ConversionSchema *schema; const EXPRESS::ConversionSchema *schema;
}; };
#if _MSC_VER > 1920 #ifdef _MSC_VER
#pragma warning(pop) #pragma warning(pop)
#endif // _WIN32 #endif // _MSC_VER
} // namespace STEP } // namespace STEP

View File

@ -74,9 +74,9 @@ Here we implement only the C++ interface (Assimp::Exporter).
namespace Assimp { namespace Assimp {
#if _MSC_VER > 1920 #ifdef _MSC_VER
# pragma warning( disable : 4800 ) # pragma warning( disable : 4800 )
#endif // _WIN32 #endif // _MSC_VER
// PostStepRegistry.cpp // PostStepRegistry.cpp

View File

@ -53,9 +53,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using namespace Assimp; using namespace Assimp;
void mydummy() {} void mydummy() {}
#if _MSC_VER > 1920 #ifdef _MSC_VER
#pragma warning(disable : 4709) #pragma warning(disable : 4709)
#endif // _WIN32 #endif // _MSC_VER
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
/** Subdivider stub class to implement the Catmull-Clarke subdivision algorithm. The /** Subdivider stub class to implement the Catmull-Clarke subdivision algorithm. The
* implementation is basing on recursive refinement. Directly evaluating the result is also * implementation is basing on recursive refinement. Directly evaluating the result is also