From e0870ade3003c57e06bf8d99c49b959848a398e5 Mon Sep 17 00:00:00 2001 From: david Date: Mon, 29 Sep 2008 21:44:12 +0000 Subject: [PATCH] =?UTF-8?q?Index=20the=20URL=20string=20with=20a=20std::st?= =?UTF-8?q?ring::size=5Ftype=20rather=20than=20an=20unsigned=20int.=20Fyod?= =?UTF-8?q?or=20got=20the=20warning=20NmapOps.cc:=20In=20function=20=C3=A2?= =?UTF-8?q?=C2=80=C2=98char*=20filename=5Fto=5Furl(const=20char*)=C3=A2?= =?UTF-8?q?=C2=80=C2=99:=20NmapOps.cc:195:=20warning:=20comparison=20is=20?= =?UTF-8?q?always=20true=20due=20to=20limited=20range=20of=20data=20type?= =?UTF-8?q?=20and=20later=20a=20segmentation=20fault.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- NmapOps.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NmapOps.cc b/NmapOps.cc index 708c300cb..1f881ef5d 100644 --- a/NmapOps.cc +++ b/NmapOps.cc @@ -190,7 +190,7 @@ char *filename_to_url(const char *filename) { #endif /* Percent-encode any troublesome characters. */ - unsigned int i = 0; + std::string::size_type i = 0; /* See RFC 3986, section 3.3 "Path" for allowed characters. */ while ((i = url.find_first_of("?#[]%", i)) != std::string::npos) { Snprintf(percent_buffer, sizeof(percent_buffer), "%%%02X", url[i]);