summaryrefslogtreecommitdiff
path: root/main/getopt.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/getopt.c')
-rw-r--r--main/getopt.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/main/getopt.c b/main/getopt.c
index 98aac5326e..9338648b10 100644
--- a/main/getopt.c
+++ b/main/getopt.c
@@ -1,8 +1,8 @@
/*
+----------------------------------------------------------------------+
- | PHP Version 5 |
+ | PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2014 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -88,8 +88,8 @@ PHPAPI int php_getopt(int argc, char* const *argv, const opt_struct opts[], char
}
}
if ((argv[*optind][0] == '-') && (argv[*optind][1] == '-')) {
- char *pos;
- int arg_end = strlen(argv[*optind])-1;
+ const char *pos;
+ int arg_end = (int)strlen(argv[*optind])-1;
/* '--' indicates end of args if not followed by a known long option name */
if (argv[*optind][2] == '\0') {
@@ -119,7 +119,7 @@ PHPAPI int php_getopt(int argc, char* const *argv, const opt_struct opts[], char
optchr = 0;
dash = 0;
- arg_start += strlen(opts[php_optidx].opt_name);
+ arg_start += (int)strlen(opts[php_optidx].opt_name);
} else {
if (!dash) {
dash = 1;