From 61e4a651d7054d41c8669c2a5340679b64f6ecf6 Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Sat, 16 Mar 2019 16:37:38 +0300 Subject: [PATCH] Suppress int conversion warnings in getopt_long compatibility --- WIN32-Code/getopt_long.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/WIN32-Code/getopt_long.c b/WIN32-Code/getopt_long.c index 03f0c01a..092defbc 100644 --- a/WIN32-Code/getopt_long.c +++ b/WIN32-Code/getopt_long.c @@ -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; } -- 2.50.1