Browse Source

Fix various compilation warnings

rdb 7 years ago
parent
commit
ac4b8d1e1d

+ 2 - 0
contrib/src/rplight/iesDataset.cxx

@@ -27,7 +27,9 @@
 
 #include "iesDataset.h"
 
+#ifndef _USE_MATH_DEFINES
 #define _USE_MATH_DEFINES
+#endif
 #include <math.h>
 
 NotifyCategoryDef(iesdataset, "")

+ 2 - 0
contrib/src/rplight/pssmCameraRig.cxx

@@ -27,7 +27,9 @@
 
 #include "pssmCameraRig.h"
 
+#ifndef _USE_MATH_DEFINES
 #define _USE_MATH_DEFINES
+#endif
 #include <math.h>
 #include "orthographicLens.h"
 

+ 2 - 0
contrib/src/rplight/rpSpotLight.cxx

@@ -27,7 +27,9 @@
 
 #include "rpSpotLight.h"
 
+#ifndef _USE_MATH_DEFINES
 #define _USE_MATH_DEFINES
+#endif
 #include <math.h>
 
 

+ 2 - 0
dtool/src/parser-inc/stdlib.h

@@ -1,3 +1,5 @@
+#pragma once
+
 #include <stdtypedefs.h>
 
 #define EXIT_SUCCESS 0

+ 2 - 2
pandatool/src/mayaprogs/mayaSavePview.cxx

@@ -72,8 +72,8 @@ doIt(const MArgList &args) {
 #ifdef WIN32_VC
   // On Windows, we use the spawn function to run pview asynchronously.
   MString quoted = MString("\"") + filename + MString("\"");
-  int retval = _spawnlp(_P_DETACH, "pview",
-                        "pview", pview_args.asChar(), quoted.asChar(), nullptr);
+  intptr_t retval = _spawnlp(_P_DETACH, "pview",
+                             "pview", pview_args.asChar(), quoted.asChar(), nullptr);
   if (retval == -1) {
     return MS::kFailure;
   }

+ 2 - 0
pandatool/src/mayaprogs/mayapath.cxx

@@ -43,7 +43,9 @@
 #include <stdlib.h>
 
 #if defined(_WIN32)
+#ifndef WIN32_LEAN_AND_MEAN
 #define WIN32_LEAN_AND_MEAN
+#endif
 #include <windows.h>
 #else
 #include <sys/stat.h>