diff options
author | Saleem Abdulrasool <compnerd@compnerd.org> | 2014-06-13 03:30:42 +0000 |
---|---|---|
committer | Saleem Abdulrasool <compnerd@compnerd.org> | 2014-06-13 03:30:42 +0000 |
commit | e8e4ae9f7815b47f6fc7dc0c609ecc346fa1b419 (patch) | |
tree | 53402058b5738a21e13e59f733f6757a36fff957 /lldb/source/Core/StructuredData.cpp | |
parent | 3924d754e59683a3461e05e3c8d57a9d6ff347fb (diff) | |
download | bcm5719-llvm-e8e4ae9f7815b47f6fc7dc0c609ecc346fa1b419.tar.gz bcm5719-llvm-e8e4ae9f7815b47f6fc7dc0c609ecc346fa1b419.zip |
Core: address comparison of signed and unsigned types
Add a cast to ensure that the comparison is done with the same sign type.
Identified by GCC.
llvm-svn: 210880
Diffstat (limited to 'lldb/source/Core/StructuredData.cpp')
-rw-r--r-- | lldb/source/Core/StructuredData.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lldb/source/Core/StructuredData.cpp b/lldb/source/Core/StructuredData.cpp index 8bbc8292b02..3c43e41f3c9 100644 --- a/lldb/source/Core/StructuredData.cpp +++ b/lldb/source/Core/StructuredData.cpp @@ -286,9 +286,11 @@ StructuredData::ParseJSON (std::string json_text) { const char *start_of_json_text = json_text.c_str(); const char *c = json_text.c_str(); - while (*c != '\0' && c - start_of_json_text <= json_text_size) + while (*c != '\0' && + static_cast<size_t>(c - start_of_json_text) <= json_text_size) { - while (isspace (*c) && c - start_of_json_text < json_text_size) + while (isspace (*c) && + static_cast<size_t>(c - start_of_json_text) < json_text_size) c++; if (*c == '{') { |