Ticket #3959 (closed defect: fixed)
cpl_port.h globally disables Visual C++ warnings
|Reported by:||mloskot||Owned by:||warmerdam|
Long time ago, I committed r10310 which is an incomplete solution because this setting affects compilation of any software where cpl_port.h is included. Basically, including cpl_port.h implicitly affects warnings state what is unwelcome if one wants to compile his software with default or higher levels.
The warnings level should be modified locally and privately using
#if defined(_MSC_VER) # pragma warning(push) # pragma warning(disable:4127) #endif ... code which causes C4127 warning #if defined(_MSC_VER) # pragma warning(pop) #endif