diff --git a/dtool/pptempl/compilerSettings.pp b/dtool/pptempl/compilerSettings.pp index 58b7dea839..fe3e69f348 100644 --- a/dtool/pptempl/compilerSettings.pp +++ b/dtool/pptempl/compilerSettings.pp @@ -13,7 +13,7 @@ #defer DEBUGPDBFLAGS /Zi /Fd"$[osfilename $[patsubst %.obj,%.pdb,$[target]]]" #defer DEBUGFLAGS /MDd $[BROWSEINFO_FLAG] $[DEBUGINFOFLAGS] $[DEBUGPDBFLAGS] #define RELEASEFLAGS /MD - #define WARNING_LEVEL_FLAG /W3 + #define WARNING_LEVEL_FLAG /Wall // NODEFAULTLIB ensures static libs linked in will connect to the correct msvcrt, so no debug/release mixing occurs #define LDFLAGS_OPT1 /NODEFAULTLIB:MSVCRT.LIB @@ -95,8 +95,9 @@ // #define OPT1FLAGS /RTCsu /GS removing /RTCu because it crashes in dxgsg with internal compiler bug #define OPT1FLAGS /RTCs /GS - // #define WARNING_LEVEL_FLAG /Wall //this is scary #define WARNING_LEVEL_FLAG /W3 // WL + //#define WARNING_LEVEL_FLAG /Wall + //#define WARNING_LEVEL_FLAG /W4 /WX // Note: Zi cannot be used on multiproc builds with precomp hdrs, Z7 must be used instead #defer DEBUGPDBFLAGS /Zi /Fd"$[osfilename $[patsubst %.obj,%.pdb, $[target]]]" diff --git a/dtool/src/dtoolutil/gnu_getopt.c b/dtool/src/dtoolutil/gnu_getopt.c index 77ffdd2f9a..8878db9ba0 100644 --- a/dtool/src/dtoolutil/gnu_getopt.c +++ b/dtool/src/dtoolutil/gnu_getopt.c @@ -175,10 +175,7 @@ static char *posixly_correct; char *getenv (); static char * -my_index (str, chr) - const char *str; - int chr; -{ +my_index (const char *str, int chr) { while (*str) { if (*str == chr) @@ -221,9 +218,7 @@ static int last_nonopt; the new indices of the non-options in ARGV after they are moved. */ static void -exchange (argv) - char **argv; -{ +exchange (char **argv) { int bottom = first_nonopt; int middle = last_nonopt; int top = optind; @@ -279,9 +274,7 @@ exchange (argv) /* Initialize the internal data when the first call is made. */ static const char * -_getopt_initialize (optstring) - const char *optstring; -{ +_getopt_initialize (const char *optstring) { /* Start processing options with ARGV-element 1 (since ARGV-element 0 is the program name); the sequence of previously skipped non-option ARGV-elements is empty. */ @@ -369,14 +362,12 @@ _getopt_initialize (optstring) long-named options. */ int -_getopt_internal (argc, argv, optstring, longopts, longind, long_only) - int argc; - char *const *argv; - const char *optstring; - const struct option *longopts; - int *longind; - int long_only; -{ +_getopt_internal (int argc, + char *const *argv, + const char *optstring, + const struct option *longopts, + int *longind, + int long_only) { optarg = NULL; if (optind == 0) @@ -477,7 +468,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) const struct option *pfound = NULL; int exact = 0; int ambig = 0; - int indfound; + int indfound = 0; int option_index; for (nameend = nextchar; *nameend && *nameend != '='; nameend++) @@ -667,11 +658,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) } int -getopt (argc, argv, optstring) - int argc; - char *const *argv; - const char *optstring; -{ +getopt (int argc, char *const *argv, const char *optstring) { return _getopt_internal (argc, argv, optstring, (const struct option *) 0, (int *) 0, @@ -686,10 +673,7 @@ getopt (argc, argv, optstring) the above definition of `getopt'. */ int -main (argc, argv) - int argc; - char **argv; -{ +main (int argc, char **argv) { int c; int digit_optind = 0; diff --git a/dtool/src/dtoolutil/gnu_getopt1.c b/dtool/src/dtoolutil/gnu_getopt1.c index ac23d3aae4..cc4db2ad2c 100644 --- a/dtool/src/dtoolutil/gnu_getopt1.c +++ b/dtool/src/dtoolutil/gnu_getopt1.c @@ -60,13 +60,11 @@ char *getenv (); #endif int -getopt_long (argc, argv, options, long_options, opt_index) - int argc; - char *const *argv; - const char *options; - const struct option *long_options; - int *opt_index; -{ +getopt_long (int argc, + char *const *argv, + const char *options, + const struct option *long_options, + int *opt_index) { return _getopt_internal (argc, argv, options, long_options, opt_index, 0); } @@ -76,13 +74,11 @@ getopt_long (argc, argv, options, long_options, opt_index) instead. */ int -getopt_long_only (argc, argv, options, long_options, opt_index) - int argc; - char *const *argv; - const char *options; - const struct option *long_options; - int *opt_index; -{ +getopt_long_only (int argc, + char *const *argv, + const char *options, + const struct option *long_options, + int *opt_index) { return _getopt_internal (argc, argv, options, long_options, opt_index, 1); } @@ -94,10 +90,7 @@ getopt_long_only (argc, argv, options, long_options, opt_index) #include int -main (argc, argv) - int argc; - char **argv; -{ +main (int argc, char **argv) { int c; int digit_optind = 0; diff --git a/dtool/src/dtoolutil/pfstream.h b/dtool/src/dtoolutil/pfstream.h index 33d715f374..f54b219774 100644 --- a/dtool/src/dtoolutil/pfstream.h +++ b/dtool/src/dtoolutil/pfstream.h @@ -25,22 +25,24 @@ class EXPCL_DTOOL IPipeStream : public istream { PUBLISHED: INLINE IPipeStream(const std::string); - INLINE void flush(void); + INLINE void flush(); + private: PipeStreamBuf _psb; - INLINE IPipeStream(void); + INLINE IPipeStream(); }; class EXPCL_DTOOL OPipeStream : public ostream { PUBLISHED: INLINE OPipeStream(const std::string); - INLINE void flush(void); + INLINE void flush(); + private: PipeStreamBuf _psb; - INLINE OPipeStream(void); + INLINE OPipeStream(); }; #include "pfstream.I"