mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-09 12:28:19 -04:00
Suppress int conversion warnings in getopt_long compatibility
(cherry picked from commit 61e4a651d7054d41c8669c2a5340679b64f6ecf6)
This commit is contained in:
parent
b062bf0af7
commit
7c669cc7e8
@ -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);
|
||||
@ -184,11 +185,11 @@ getopt_long(nargc, nargv, options, long_options, index)
|
||||
} else
|
||||
current_argv_len = strlen(current_argv);
|
||||
|
||||
for (i = 0; long_options[i].name; i++) {
|
||||
for (i = 0; long_options[i].name; i++) {
|
||||
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