From: Azat Khuzhin <azat@libevent.org>
Date: Sat, 16 Mar 2019 13:37:38 +0000 (+0300)
Subject: Suppress int conversion warnings in getopt_long compatibility
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=61e4a651d7054d41c8669c2a5340679b64f6ecf6;p=libevent

Suppress int conversion warnings in getopt_long compatibility
---

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;
 			}