]> git.ipfire.org Git - thirdparty/make.git/commitdiff
Clean up more Windows warnings.
authorPaul Smith <psmith@gnu.org>
Tue, 7 Sep 2021 05:02:25 +0000 (01:02 -0400)
committerPaul Smith <psmith@gnu.org>
Tue, 7 Sep 2021 05:14:33 +0000 (01:14 -0400)
* src/config.h.W32.template: Re-enable warnings that we don't violate.
Add a new disabled warning: 4130 (logical operation on address of
string constant).
* src/w32/compat/posixfcn.c: Make makeint.h the first included header.
* src/w32/subproc/sub_proc.c: Ditto.  It includes config.h already.

src/config.h.W32.template
src/w32/compat/posixfcn.c
src/w32/subproc/sub_proc.c

index 347f42011960335fa929a3c83d5d60cdfebdc92f..f847be87221004c4442ceaf931a69b350f1ea166 100644 (file)
@@ -19,12 +19,11 @@ this program.  If not, see <http://www.gnu.org/licenses/>.  */
    Maybe after the code cleanup for ISO C we can remove some/all of these.  */
 #if _MSC_VER > 1000
 # pragma warning(disable:4100) /* unreferenced formal parameter */
-# pragma warning(disable:4102) /* unreferenced label */
-# pragma warning(disable:4127) /* conditional expression is constant */
+# pragma warning(disable:4130) /* logical operation on address of string constant */
 # pragma warning(disable:4131) /* uses old-style declarator */
 # pragma warning(disable:4702) /* unreachable code */
-# define _CRT_SECURE_NO_WARNINGS  /* function or variable may be unsafe */
-# define _CRT_NONSTDC_NO_WARNINGS /* functions w/o a leading underscore */
+# define _CRT_SECURE_NO_WARNINGS  /* function or variable may be unsafe */
+# define _CRT_NONSTDC_NO_WARNINGS /* functions w/o a leading underscore */
 #endif
 
 /* Define to 1 if the 'closedir' function returns void instead of 'int'. */
index 00d87e0059b1ce272239b9879ace95b176888432..0bd1be0033dd7b9f4e866a38842de4fd1fb9b2c2 100644 (file)
@@ -15,6 +15,8 @@ A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
 You should have received a copy of the GNU General Public License along with
 this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+#include "makeint.h"
+
 #include <string.h>
 #include <io.h>
 #include <stdarg.h>
@@ -23,7 +25,6 @@ this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "dlfcn.h"
 
-#include "makeint.h"
 #include "job.h"
 
 #ifndef NO_OUTPUT_SYNC
index c0c4f44d7a8d8a65f335f909553c962677806113..b8984be84a8671a5e7df085deee26f137f238088 100644 (file)
@@ -14,8 +14,9 @@ A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
 You should have received a copy of the GNU General Public License along with
 this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+#include "makeint.h"
+
 #include <assert.h>
-#include <config.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include <io.h>         /* for _get_osfhandle */
@@ -29,7 +30,6 @@ this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <signal.h>
 #include <windows.h>
 
-#include "makeint.h"
 #include "filedef.h"
 #include "variable.h"
 #include "sub_proc.h"