Skip to content

Commit

Permalink
squashme: remove more warning-disable 4127 cruft
Browse files Browse the repository at this point in the history
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 a7d9493
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 37 deletions.
1 change: 0 additions & 1 deletion lib/CMakeLists.txt
Expand Up @@ -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
Expand Down
31 changes: 2 additions & 29 deletions src/tool_doswin.c
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 0 additions & 4 deletions tests/libtest/CMakeLists.txt
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion tests/server/CMakeLists.txt
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions winbuild/MakefileBuild.vc
Expand Up @@ -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)
Expand Down

0 comments on commit a7d9493

Please sign in to comment.