MSVC: improve warnings for scons and cmake
Some int/float conversion warnings were disabled by buildsystems but re-enabled by BLI_winstuff.h, the warnigns relate to conversions not considered issues on other systems so better just quiet them.
This commit is contained in:
@@ -1007,6 +1007,7 @@ elseif(WIN32)
|
|||||||
# disable:
|
# disable:
|
||||||
"/wd4018" # signed/unsigned mismatch
|
"/wd4018" # signed/unsigned mismatch
|
||||||
"/wd4065" # switch statement contains 'default' but no 'case' labels
|
"/wd4065" # switch statement contains 'default' but no 'case' labels
|
||||||
|
"/wd4127" # conditional expression is constant
|
||||||
"/wd4181" # qualifier applied to reference type; ignored
|
"/wd4181" # qualifier applied to reference type; ignored
|
||||||
"/wd4200" # zero-sized array in struct/union
|
"/wd4200" # zero-sized array in struct/union
|
||||||
"/wd4244" # conversion from 'type1' to 'type2', possible loss of data
|
"/wd4244" # conversion from 'type1' to 'type2', possible loss of data
|
||||||
|
@@ -246,7 +246,7 @@ BF_OPENGL_LIB_STATIC = [ '${BF_OPENGL}/lib/libGL.a', '${BF_OPENGL}/lib/libGLU.a'
|
|||||||
CC = 'cl.exe'
|
CC = 'cl.exe'
|
||||||
CXX = 'cl.exe'
|
CXX = 'cl.exe'
|
||||||
|
|
||||||
CCFLAGS = ['/nologo', '/J', '/W1', '/Gd', '/wd4018', '/wd4244', '/wd4305', '/wd4800', '/wd4065', '/wd4267', '/we4013']
|
CCFLAGS = ['/nologo', '/J', '/W1', '/Gd', '/wd4018', '/wd4065', '/wd4127', '/wd4181', '/wd4200', '/wd4244', '/wd4267', '/wd4305', '/wd4800', '/we4013']
|
||||||
CXXFLAGS = ['/EHsc']
|
CXXFLAGS = ['/EHsc']
|
||||||
BGE_CXXFLAGS = ['/O2', '/Ob2', '/EHsc', '/GR', '/fp:fast', '/arch:SSE']
|
BGE_CXXFLAGS = ['/O2', '/Ob2', '/EHsc', '/GR', '/fp:fast', '/arch:SSE']
|
||||||
|
|
||||||
|
@@ -245,7 +245,8 @@ CC = 'cl.exe'
|
|||||||
CXX = 'cl.exe'
|
CXX = 'cl.exe'
|
||||||
|
|
||||||
CFLAGS = []
|
CFLAGS = []
|
||||||
CCFLAGS = ['/nologo', '/J', '/W1', '/Gd', '/we4013', '/wd4018', '/wd4244', '/wd4305', '/wd4800', '/wd4065', '/wd4267']
|
CCFLAGS = ['/nologo', '/J', '/W1', '/Gd', '/wd4018', '/wd4065', '/wd4127', '/wd4181', '/wd4200', '/wd4244', '/wd4267', '/wd4305', '/wd4800', '/we4013']
|
||||||
|
|
||||||
CXXFLAGS = ['/EHsc']
|
CXXFLAGS = ['/EHsc']
|
||||||
BGE_CXXFLAGS = ['/O2', '/Ob2', '/EHsc', '/GR', '/fp:fast']
|
BGE_CXXFLAGS = ['/O2', '/Ob2', '/EHsc', '/GR', '/fp:fast']
|
||||||
|
|
||||||
|
@@ -256,10 +256,6 @@ typedef struct PBVHVertexIter {
|
|||||||
float *mask;
|
float *mask;
|
||||||
} PBVHVertexIter;
|
} PBVHVertexIter;
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#pragma warning (disable:4127) // conditional expression is constant
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void pbvh_vertex_iter_init(PBVH *bvh, PBVHNode *node,
|
void pbvh_vertex_iter_init(PBVH *bvh, PBVHNode *node,
|
||||||
PBVHVertexIter *vi, int mode);
|
PBVHVertexIter *vi, int mode);
|
||||||
|
|
||||||
|
@@ -37,9 +37,7 @@
|
|||||||
# error "This include is for Windows only!"
|
# error "This include is for Windows only!"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef FREE_WINDOWS
|
#ifdef FREE_WINDOWS
|
||||||
# pragma warning(once: 4761 4305 4244 4018)
|
|
||||||
#else
|
|
||||||
# ifdef WINVER
|
# ifdef WINVER
|
||||||
# undef WINVER
|
# undef WINVER
|
||||||
# endif
|
# endif
|
||||||
|
@@ -32,11 +32,6 @@
|
|||||||
* \ingroup bli
|
* \ingroup bli
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
# pragma warning (disable:4244)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <ft2build.h>
|
#include <ft2build.h>
|
||||||
#include FT_FREETYPE_H
|
#include FT_FREETYPE_H
|
||||||
/* not needed yet */
|
/* not needed yet */
|
||||||
|
@@ -30,12 +30,6 @@
|
|||||||
* \ingroup bli
|
* \ingroup bli
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
# pragma warning (disable:4244) /* "conversion from double to float" */
|
|
||||||
# pragma warning (disable:4305) /* "truncation from const double to float" */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#include "BLI_noise.h"
|
#include "BLI_noise.h"
|
||||||
|
Reference in New Issue
Block a user