getopt_long.c: placate visual c by adding a few explicit typecasts

feature/tap-sh
Dan Kegel 2017-06-05 10:23:30 -07:00
parent 347539ca87
commit 9131496d64
1 changed files with 3 additions and 3 deletions

View File

@ -287,7 +287,7 @@ parse_long_options(char * const *nargv, const char *options,
* XXX: GNU sets pkg_optopt to val regardless of flag
*/
if (long_options[match].flag == NULL)
pkg_optopt = long_options[match].val;
pkg_optopt = (int)long_options[match].val;
else
pkg_optopt = 0;
#ifdef GNU_COMPATIBLE
@ -327,7 +327,7 @@ parse_long_options(char * const *nargv, const char *options,
* XXX: GNU sets pkg_optopt to val regardless of flag
*/
if (long_options[match].flag == NULL)
pkg_optopt = long_options[match].val;
pkg_optopt = (int)long_options[match].val;
else
pkg_optopt = 0;
--pkg_optind;
@ -360,7 +360,7 @@ parse_long_options(char * const *nargv, const char *options,
#endif
return (0);
} else
return (long_options[match].val);
return ((int)long_options[match].val);
}
/*