diff options
author | Evan Martin <martine@danga.com> | 2012-07-27 17:15:34 (GMT) |
---|---|---|
committer | Evan Martin <martine@danga.com> | 2012-07-27 17:20:16 (GMT) |
commit | 00d68972b13ec20fd09301784ae330f7a1921568 (patch) | |
tree | 0ad76db4f62217aca8bc0c9f9eb0ebbf74c600c5 | |
parent | 2c7354b47d7719b9ca758bc98084cb204aa3d7a9 (diff) | |
download | Ninja-00d68972b13ec20fd09301784ae330f7a1921568.zip Ninja-00d68972b13ec20fd09301784ae330f7a1921568.tar.gz Ninja-00d68972b13ec20fd09301784ae330f7a1921568.tar.bz2 |
fix some mingw warnings in getopt.c
From a patch from Claus Klein <claus.klein@arcormail.de>.
-rw-r--r-- | src/getopt.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/getopt.c b/src/getopt.c index 1e3c09d..75ef99c 100644 --- a/src/getopt.c +++ b/src/getopt.c @@ -91,10 +91,6 @@ gpietsch@comcast.net #include "getopt.h" #endif -#ifdef _WIN32 -#pragma warning(disable: 4701) -#endif - /* macros */ /* types */ @@ -159,7 +155,7 @@ getopt_internal (int argc, char **argv, char *shortopts, char *possible_arg = NULL; int longopt_match = -1; int has_arg = -1; - char *cp; + char *cp = NULL; int arg_next = 0; /* first, deal with silly parameters and easy stuff */ @@ -255,7 +251,7 @@ getopt_internal (int argc, char **argv, char *shortopts, longopts[optindex].name, match_chars) == 0) { /* do we have an exact match? */ - if (match_chars == (int) (strlen (longopts[optindex].name))) + if (match_chars == strlen (longopts[optindex].name)) { longopt_match = optindex; break; |