mirror of
https://github.com/libevent/libevent.git
synced 2025-01-09 00:56:20 +08:00
Suppress int conversion warnings in getopt_long compatibility
This commit is contained in:
parent
68eb526d7b
commit
61e4a651d7
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user