VirtualBox

Changeset 62595 in vbox for trunk/Config.kmk


Ignore:
Timestamp:
Jul 27, 2016 2:35:30 PM (8 years ago)
Author:
vboxsync
Message:

Config.kmk: VBoxBldProg: -Wall for MSC

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Config.kmk

    r62585 r62595  
    15751575
    15761576#
    1577 # Compiler optimization flags.
     1577# Compiler warning control.
    15781578#
    15791579VBOX_GCC_WARN     ?= -Wall $(VBOX_GCC_Wextra) $(VBOX_GCC_Wno-missing-field-initializers) -Wno-unused -Wno-trigraphs \
     
    15871587VBOX_GCC_PEDANTIC_CXX ?= -pedantic $(VBOX_GCC_WARN_PEDANTIC) $(VBOX_GCC_Wno-return-type-c-linkage)
    15881588VBOX_GCC_PEDANTIC_C   ?= -pedantic $(VBOX_GCC_WARN_PEDANTIC) -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Werror-implicit-function-declaration
     1589
     1590# Disabled Visual C++ warnings, W4:
     1591#      -wd4065: switch statement contains 'default' but no 'case' labels
     1592#      -wd4996: deprecated / insecure.
     1593#      -wd4127: conditional expression is constant [level 4]
     1594#      -wd4706: assignment within conditional expression [level 4]
     1595#      -wd4201: nonstandard extension used : nameless struct/union [level 4]
     1596#      -wd4214: nonstandard extension used : bit field types other than int [level 4]
     1597#      -wd4510: 'VM::<unnamed-tag>' : default constructor could not be generated
     1598#      -wd4512: 'VM' : assignment operator could not be generated
     1599#      -wd4610: union 'VM::<unnamed-tag>' can never be instantiated - user defined constructor required
     1600# Disabled Visual C++ warnings, Wall:
     1601#      -wd4514: unreferenced inline function has been removed
     1602#      -wd4820: 'RTSTRSPACECORE' : '7' bytes padding added after data member 'RTSTRSPACECORE::uchHeight'
     1603#      -wd4365: '=' : conversion from 'unsigned char' to 'char', signed/unsigned mismatch
     1604#      -wd4987: nonstandard extension used: 'throw (...)' (setjmp.h + our stuff)
     1605#      -wd4710: 'std::string std::_Narrow_str(std::wstring)' : function not inlined
     1606#      -wd4061: enumerator 'RTASN1TYPE_END' in switch of enum 'RTASN1TYPE' is not explicitly handled by a case label
     1607#               Note! C4062 checks for the same but includes the 'default' case, just like gcc.  So, no trouble disabling this.
     1608#      -wd4986: 'operator new[]': exception specification does not match previous declaration (crtdbg.h vs new, exception specification only)
     1609#      -wd4191: 'type cast' : unsafe conversion from 'int (__cdecl *)(gzFile)' to 'PFNRT'
     1610#      -wd4574: 'INCL_WINSOCK_API_TYPEDEFS' is defined to be '0': did you mean to use '#if INCL_WINSOCK_API_TYPEDEFS'?
     1611#      -wd4917: 'OLE_XPOS_HIMETRIC' : a GUID can only be associated with a class, interface or namespace
     1612#      -wd4711: function 'void __cdecl rtMemCacheFreeOne(struct RTMEMCACHEINT * __ptr64,void * __ptr64)' selected for automatic inline expansion
     1613# Want to enable these:
     1614#      -wd4242: '=' : conversion from 'uint32_t' to 'uint8_t', possible loss of data
     1615#      -wd4244: 'conversion' conversion from 'type1' to 'type2', possible loss of data
     1616VBOX_VCC_WARN_ALL ?= -W4 -Wall -wd4065 -wd4996 -wd4127 -wd4706 -wd4201 -wd4214 -wd4510 -wd4512 -wd4610 \
     1617        -wd4514 -wd4820 -wd4365 -wd4987 -wd4710 -wd4061 -wd4986 -wd4191 -wd4574 -wd4917 -wd4711
     1618ifndef VBOX_WITH_MASOCHISTIC_WARNINGS
     1619 VBOX_VCC_WARN_ALL += -wd4100
     1620endif
     1621VBOX_VCC_WARN_ALL += -wd4242 -wd4244
     1622
    15891623ifeq ($(KBUILD_TARGET),win)
    1590  VBOX_C_CXX_FLAGS_NO_UNUSED_PARAMETERS = #-Wdxxxx
     1624 VBOX_C_CXX_FLAGS_NO_UNUSED_PARAMETERS = -wd4100
    15911625else
    15921626 VBOX_C_CXX_FLAGS_NO_UNUSED_PARAMETERS = -Wno-unused-parameter
    15931627endif
     1628
     1629#
     1630# Compiler optimization flags.
     1631#
    15941632ifeq ($(KBUILD_TYPE),debug)
    15951633 VBOX_GCC_FP     ?= -fno-omit-frame-pointer
     
    57695807#
    57705808# Template for building build bldprogs.
    5771 #
    5772 # Disabled Visual C++ warnings:
    5773 #      -wd4065: switch statement contains 'default' but no 'case' labels
    5774 #      -wd4996: deprecated / insecure.
    5775 #      -wd4127: conditional expression is constant [level 4]
    5776 #      -wd4706: assignment within conditional expression [level 4]
    5777 #      -wd4201: nonstandard extension used : nameless struct/union [level 4]
    5778 #      -wd4214: nonstandard extension used : bit field types other than int [level 4]
    5779 #      -wd4510: 'VM::<unnamed-tag>' : default constructor could not be generated
    5780 #      -wd4512: 'VM' : assignment operator could not be generated
    5781 #      -wd4610: union 'VM::<unnamed-tag>' can never be instantiated - user defined constructor required
    5782 #
    5783 #      -wd4244: 'conversion' conversion from 'type1' to 'type2', possible loss of data --- TODO: Enable this one!
    5784 #      -wd4100: 'identifier' : unreferenced formal parameter [level 4] --- TODO: Enable this one!
    5785 #
    5786 #
    57875809# HACK ALERT! The BLD_TRG_* is a hack to allow building libraries as well.
    57885810#
     
    58195841 TEMPLATE_VBoxBldProg_SDKS              := ReorderCompilerIncs $(VBOX_WINPSDK)
    58205842 TEMPLATE_VBoxBldProg_CXXFLAGS          := -Zi -Zl -GR- -EHsc -GF -Zc:wchar_t- $(VBOX_VCC_OPT) $(VBOX_VCC_FP) -MT$(VBOX_VCC_CRT_TYPE) \
    5821         -W4 -wd4065 -wd4996 -wd4127 -wd4706 -wd4201 -wd4214 -wd4510 -wd4512 -wd4610  -wd4100 -wd4244
     5843        $(VBOX_VCC_WARN_ALL)
    58225844 TEMPLATE_VBoxBldProg_CXXFLAGS.debug    := -RTCsu
    58235845 TEMPLATE_VBoxBldProg_CXXFLAGS.dbgopt    = $(NO_SUCH_VARIABLE)
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette