Suppress int conversion warnings in getopt_long compatibility

This commit is contained in:
Azat Khuzhin 2019-03-16 16:37:38 +03:00
parent 68eb526d7b
commit 61e4a651d7
No known key found for this signature in database
GPG Key ID: B86086848EF8686D

View File

@ -173,7 +173,8 @@ getopt_long(nargc, nargv, options, long_options, index)
if ((retval = getopt_internal(nargc, nargv, options)) == -2) {
char *current_argv = nargv[optind++] + 2, *has_equal;
int i, current_argv_len, match = -1;
int i, match = -1;
size_t current_argv_len;
if (*current_argv == '\0') {
return(-1);
@ -188,7 +189,7 @@ getopt_long(nargc, nargv, options, long_options, index)
if (strncmp(current_argv, long_options[i].name, current_argv_len))
continue;
if (strlen(long_options[i].name) == (unsigned)current_argv_len) {
if (strlen(long_options[i].name) == current_argv_len) {
match = i;
break;
}