curl/winbuild
Jay Satiro 9c1806ae46 build: Disable Visual Studio warning "conditional expression is constant"
- Disable warning C4127 "conditional expression is constant" globally
  in curl_setup.h for when building with Microsoft's compiler.

This mainly affects building with the Visual Studio project files found
in the projects dir.

Prior to this change the cmake and winbuild build systems already
disabled 4127 globally for when building with Microsoft's compiler.
Also, 4127 was already disabled for all build systems in the limited
circumstance of the WHILE_FALSE macro which disabled the warning
specifically for while(0). This commit removes the WHILE_FALSE macro and
all other cruft in favor of disabling globally in curl_setup.

Background:

We have various macros that cause 0 or 1 to be evaluated, which would
cause warning C4127 in Visual Studio. For example this causes it:

    #define Curl_resolver_asynch() 1

Full behavior is not clearly defined and inconsistent across versions.
However it is documented that since VS 2015 Update 3 Microsoft has
addressed this somewhat but not entirely, not warning on while(true) for
example.

Prior to this change some C4127 warnings occurred when I built with
Visual Studio using the generated projects in the projects dir.

Closes https://github.com/curl/curl/pull/4658
2019-12-01 19:01:02 -05:00
..
.gitignore
BUILD.WINDOWS.txt winbuild: use WITH_PREFIX if given 2019-06-17 13:39:51 +02:00
Makefile.vc winbuild: add ENABLE_UNICODE option 2019-10-04 11:29:08 +02:00
MakefileBuild.vc build: Disable Visual Studio warning "conditional expression is constant" 2019-12-01 19:01:02 -05:00
gen_resp_file.bat winbuild: Use two space indentation 2019-05-23 21:46:26 +01:00
makedebug.cmd winbuild: Use two space indentation 2019-05-23 21:46:26 +01:00
rundebug.cmd winbuild: Add our standard copyright header to the winbuild batch files 2019-05-05 20:17:58 +01:00