Fix signed vs unsigned compiler warnings
This commit is contained in:
@@ -134,7 +134,7 @@ public:
|
|||||||
method = line[0];
|
method = line[0];
|
||||||
path = line[1];
|
path = line[1];
|
||||||
|
|
||||||
int queryPos = path.find('?');
|
string::size_type queryPos = path.find('?');
|
||||||
if (queryPos != string::npos) {
|
if (queryPos != string::npos) {
|
||||||
parseArgs(path.substr(queryPos + 1));
|
parseArgs(path.substr(queryPos + 1));
|
||||||
path = path.substr(0, queryPos);
|
path = path.substr(0, queryPos);
|
||||||
@@ -151,8 +151,8 @@ public:
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int colonPos = buffer.find(':');
|
string::size_type colonPos = buffer.find(':');
|
||||||
if (colonPos < 0) {
|
if (colonPos == string::npos) {
|
||||||
cerr << "malformed HTTP response header:" << buffer << endl;
|
cerr << "malformed HTTP response header:" << buffer << endl;
|
||||||
buffer.clear();
|
buffer.clear();
|
||||||
return;
|
return;
|
||||||
@@ -173,8 +173,8 @@ public:
|
|||||||
{
|
{
|
||||||
string_list argv = strutils::split(argData, "&");
|
string_list argv = strutils::split(argData, "&");
|
||||||
for (unsigned int a=0; a<argv.size(); ++a) {
|
for (unsigned int a=0; a<argv.size(); ++a) {
|
||||||
int eqPos = argv[a].find('=');
|
string::size_type eqPos = argv[a].find('=');
|
||||||
if (eqPos < 0) {
|
if (eqPos == string::npos) {
|
||||||
cerr << "malformed HTTP argument:" << argv[a] << endl;
|
cerr << "malformed HTTP argument:" << argv[a] << endl;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user