Skip to content
Permalink
Browse files

squashme: remove more warning-disable 4127 cruft

4127 is disabled globally in curl_setup.h which is as close as we get so
it no longer needs to be disabled in each individual build system.
  • Loading branch information
jay committed Nov 30, 2019
1 parent e5ff1b1 commit a7d949330af042fda2a1819f5211e63a0c8b15de
Showing with 5 additions and 37 deletions.
  1. +0 −1 lib/CMakeLists.txt
  2. +2 −29 src/tool_doswin.c
  3. +0 −4 tests/libtest/CMakeLists.txt
  4. +1 −1 tests/server/CMakeLists.txt
  5. +2 −2 winbuild/MakefileBuild.vc
@@ -20,7 +20,6 @@ list(APPEND HHEADERS

if(MSVC)
list(APPEND CSOURCES libcurl.rc)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4127")
endif()

# SET(CSOURCES
@@ -38,33 +38,6 @@

#include "memdebug.h" /* keep this as LAST include */

/*
* Macros ALWAYS_TRUE and ALWAYS_FALSE are used to avoid compiler warnings.
*/

#define ALWAYS_TRUE (1)
#define ALWAYS_FALSE (0)

#if defined(_MSC_VER) && !defined(__POCC__)
# undef ALWAYS_TRUE
# undef ALWAYS_FALSE
# if (_MSC_VER < 1500)
# define ALWAYS_TRUE (0, 1)
# define ALWAYS_FALSE (1, 0)
# else
# define ALWAYS_TRUE \
__pragma(warning(push)) \
__pragma(warning(disable:4127)) \
(1) \
__pragma(warning(pop))
# define ALWAYS_FALSE \
__pragma(warning(push)) \
__pragma(warning(disable:4127)) \
(0) \
__pragma(warning(pop))
# endif
#endif

#ifdef WIN32
# undef PATH_MAX
# define PATH_MAX MAX_PATH
@@ -79,9 +52,9 @@ __pragma(warning(pop))
#endif

#ifdef WIN32
# define _use_lfn(f) ALWAYS_TRUE /* long file names always available */
# define _use_lfn(f) (1) /* long file names always available */
#elif !defined(__DJGPP__) || (__DJGPP__ < 2) /* DJGPP 2.0 has _use_lfn() */
# define _use_lfn(f) ALWAYS_FALSE /* long file names never available */
# define _use_lfn(f) (0) /* long file names never available */
#elif defined(__DJGPP__)
# include <fcntl.h> /* _use_lfn(f) prototype */
#endif
@@ -1,9 +1,5 @@
set(TARGET_LABEL_PREFIX "Test ")

if(MSVC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4127")
endif()

function(setup_test TEST_NAME) # ARGN are the files in the test
add_executable( ${TEST_NAME} ${ARGN} )
string(TOUPPER ${TEST_NAME} UPPER_TEST_NAME)
@@ -1,7 +1,7 @@
set(TARGET_LABEL_PREFIX "Test server ")

if(MSVC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4127 /wd4306")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4306")
endif()

function(SETUP_EXECUTABLE TEST_NAME) # ARGN are the files in the test
@@ -61,11 +61,11 @@ CC = cl.exe
!IF "$(VC)"=="6"
CC_NODEBUG = $(CC) /O2 /DNDEBUG
CC_DEBUG = $(CC) /Od /Gm /Zi /D_DEBUG /GZ
CFLAGS = /I. /I../lib /I../include /nologo /W4 /wd4127 /GX /DWIN32 /YX /FD /c /DBUILDING_LIBCURL
CFLAGS = /I. /I../lib /I../include /nologo /W4 /GX /DWIN32 /YX /FD /c /DBUILDING_LIBCURL
!ELSE
CC_NODEBUG = $(CC) /O2 /DNDEBUG
CC_DEBUG = $(CC) /Od /D_DEBUG /RTC1 /Z7 /LDd
CFLAGS = /I. /I ../lib /I../include /nologo /W4 /wd4127 /EHsc /DWIN32 /FD /c /DBUILDING_LIBCURL
CFLAGS = /I. /I ../lib /I../include /nologo /W4 /EHsc /DWIN32 /FD /c /DBUILDING_LIBCURL
!ENDIF

LFLAGS = /nologo /machine:$(MACHINE)

0 comments on commit a7d9493

Please sign in to comment.
You can’t perform that action at this time.