diff options
author | Saleem Abdulrasool <compnerd@compnerd.org> | 2014-04-02 03:51:35 +0000 |
---|---|---|
committer | Saleem Abdulrasool <compnerd@compnerd.org> | 2014-04-02 03:51:35 +0000 |
commit | 3985c8c64680d89a3ab328347e795af0c69c48ea (patch) | |
tree | 79b033e897a72dfd79894bf9fea2481042976232 /lldb/source/Interpreter/Args.cpp | |
parent | f7da6c1fcf5d0968b473226df0ec7493d61f2711 (diff) | |
download | bcm5719-llvm-3985c8c64680d89a3ab328347e795af0c69c48ea.tar.gz bcm5719-llvm-3985c8c64680d89a3ab328347e795af0c69c48ea.zip |
sanitise sign comparisons
This is a mechanical change addressing the various sign comparison warnings that
are identified by both clang and gcc. This helps cleanup some of the warning
spew that occurs during builds.
llvm-svn: 205390
Diffstat (limited to 'lldb/source/Interpreter/Args.cpp')
-rw-r--r-- | lldb/source/Interpreter/Args.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lldb/source/Interpreter/Args.cpp b/lldb/source/Interpreter/Args.cpp index b6f34fd1f7f..774d1bbc568 100644 --- a/lldb/source/Interpreter/Args.cpp +++ b/lldb/source/Interpreter/Args.cpp @@ -1516,11 +1516,11 @@ Args::ParseArgsForCompletion // were passed. This will be useful when we come to restricting completions based on what other // options we've seen on the line. - if (OptionParser::GetOptionIndex() < dummy_vec.size() - 1 + if (static_cast<size_t>(OptionParser::GetOptionIndex()) < dummy_vec.size() - 1 && (strcmp (dummy_vec[OptionParser::GetOptionIndex()-1], "--") == 0)) { dash_dash_pos = OptionParser::GetOptionIndex() - 1; - if (OptionParser::GetOptionIndex() - 1 == cursor_index) + if (static_cast<size_t>(OptionParser::GetOptionIndex() - 1) == cursor_index) { option_element_vector.push_back (OptionArgElement (OptionArgElement::eBareDoubleDash, OptionParser::GetOptionIndex() - 1, OptionArgElement::eBareDoubleDash)); @@ -1630,7 +1630,7 @@ Args::ParseArgsForCompletion // the option_element_vector, but only if it is not after the "--". But it turns out that OptionParser::Parse just ignores // an isolated "-". So we have to look it up by hand here. We only care if it is AT the cursor position. - if ((dash_dash_pos == -1 || cursor_index < dash_dash_pos) + if ((static_cast<int32_t>(dash_dash_pos) == -1 || cursor_index < dash_dash_pos) && strcmp (GetArgumentAtIndex(cursor_index), "-") == 0) { option_element_vector.push_back (OptionArgElement (OptionArgElement::eBareDash, cursor_index, |