Browse Source

minor touchups

Dave Schuyler 22 years ago
parent
commit
0962feef52

+ 3 - 2
dtool/pptempl/compilerSettings.pp

@@ -13,7 +13,7 @@
   #defer DEBUGPDBFLAGS /Zi /Fd"$[osfilename $[patsubst %.obj,%.pdb,$[target]]]"
   #defer DEBUGPDBFLAGS /Zi /Fd"$[osfilename $[patsubst %.obj,%.pdb,$[target]]]"
   #defer DEBUGFLAGS /MDd $[BROWSEINFO_FLAG] $[DEBUGINFOFLAGS] $[DEBUGPDBFLAGS]
   #defer DEBUGFLAGS /MDd $[BROWSEINFO_FLAG] $[DEBUGINFOFLAGS] $[DEBUGPDBFLAGS]
   #define RELEASEFLAGS /MD
   #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
   // NODEFAULTLIB ensures static libs linked in will connect to the correct msvcrt, so no debug/release mixing occurs
   #define LDFLAGS_OPT1 /NODEFAULTLIB:MSVCRT.LIB
   #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 /RTCsu /GS  removing /RTCu because it crashes in dxgsg with internal compiler bug
   #define OPT1FLAGS /RTCs /GS
   #define OPT1FLAGS /RTCs /GS
 
 
-  //  #define WARNING_LEVEL_FLAG /Wall  //this is scary
   #define WARNING_LEVEL_FLAG /W3   // WL
   #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
   // 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]]]"
   #defer DEBUGPDBFLAGS /Zi /Fd"$[osfilename $[patsubst %.obj,%.pdb, $[target]]]"

+ 12 - 28
dtool/src/dtoolutil/gnu_getopt.c

@@ -175,10 +175,7 @@ static char *posixly_correct;
 char *getenv ();
 char *getenv ();
 
 
 static char *
 static char *
-my_index (str, chr)
-     const char *str;
-     int chr;
-{
+my_index (const char *str, int chr) {
   while (*str)
   while (*str)
     {
     {
       if (*str == chr)
       if (*str == chr)
@@ -221,9 +218,7 @@ static int last_nonopt;
    the new indices of the non-options in ARGV after they are moved.  */
    the new indices of the non-options in ARGV after they are moved.  */
 
 
 static void
 static void
-exchange (argv)
-     char **argv;
-{
+exchange (char **argv) {
   int bottom = first_nonopt;
   int bottom = first_nonopt;
   int middle = last_nonopt;
   int middle = last_nonopt;
   int top = optind;
   int top = optind;
@@ -279,9 +274,7 @@ exchange (argv)
 /* Initialize the internal data when the first call is made.  */
 /* Initialize the internal data when the first call is made.  */
 
 
 static const char *
 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
   /* Start processing options with ARGV-element 1 (since ARGV-element 0
      is the program name); the sequence of previously skipped
      is the program name); the sequence of previously skipped
      non-option ARGV-elements is empty.  */
      non-option ARGV-elements is empty.  */
@@ -369,14 +362,12 @@ _getopt_initialize (optstring)
    long-named options.  */
    long-named options.  */
 
 
 int
 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;
   optarg = NULL;
 
 
   if (optind == 0)
   if (optind == 0)
@@ -477,7 +468,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
       const struct option *pfound = NULL;
       const struct option *pfound = NULL;
       int exact = 0;
       int exact = 0;
       int ambig = 0;
       int ambig = 0;
-      int indfound;
+      int indfound = 0;
       int option_index;
       int option_index;
 
 
       for (nameend = nextchar; *nameend && *nameend != '='; nameend++)
       for (nameend = nextchar; *nameend && *nameend != '='; nameend++)
@@ -667,11 +658,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
 }
 }
 
 
 int
 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,
   return _getopt_internal (argc, argv, optstring,
                            (const struct option *) 0,
                            (const struct option *) 0,
                            (int *) 0,
                            (int *) 0,
@@ -686,10 +673,7 @@ getopt (argc, argv, optstring)
    the above definition of `getopt'.  */
    the above definition of `getopt'.  */
 
 
 int
 int
-main (argc, argv)
-     int argc;
-     char **argv;
-{
+main (int argc, char **argv) {
   int c;
   int c;
   int digit_optind = 0;
   int digit_optind = 0;
 
 

+ 11 - 18
dtool/src/dtoolutil/gnu_getopt1.c

@@ -60,13 +60,11 @@ char *getenv ();
 #endif
 #endif
 
 
 int
 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);
   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.  */
    instead.  */
 
 
 int
 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);
   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 <stdio.h>
 #include <stdio.h>
 
 
 int
 int
-main (argc, argv)
-     int argc;
-     char **argv;
-{
+main (int argc, char **argv) {
   int c;
   int c;
   int digit_optind = 0;
   int digit_optind = 0;
 
 

+ 6 - 4
dtool/src/dtoolutil/pfstream.h

@@ -25,22 +25,24 @@ class EXPCL_DTOOL IPipeStream : public istream {
 PUBLISHED:
 PUBLISHED:
   INLINE IPipeStream(const std::string);
   INLINE IPipeStream(const std::string);
 
 
-  INLINE void flush(void);
+  INLINE void flush();
+
 private:
 private:
   PipeStreamBuf _psb;
   PipeStreamBuf _psb;
 
 
-  INLINE IPipeStream(void);
+  INLINE IPipeStream();
 };
 };
 
 
 class EXPCL_DTOOL OPipeStream : public ostream {
 class EXPCL_DTOOL OPipeStream : public ostream {
 PUBLISHED:
 PUBLISHED:
   INLINE OPipeStream(const std::string);
   INLINE OPipeStream(const std::string);
 
 
-  INLINE void flush(void);
+  INLINE void flush();
+
 private:
 private:
   PipeStreamBuf _psb;
   PipeStreamBuf _psb;
 
 
-  INLINE OPipeStream(void);
+  INLINE OPipeStream();
 };
 };
 
 
 #include "pfstream.I"
 #include "pfstream.I"