Skip to content
Snippets Groups Projects
Commit e08eee61 authored by Brad King's avatar Brad King
Browse files

SystemTools: Fix conversion warning in test case

```
testSystemTools.cxx:901:32: warning: comparison of integers of different
  signs: 'size_type' (aka 'unsigned long') and 'long' [-Wsign-compare]
    if (!result || line.size() != size) {
                   ~~~~~~~~~~~ ^  ~~~~
```
parent 0541ce21
No related branches found
No related tags found
1 merge request!8SystemTools: Fix conversion warning in test case
......@@ -894,10 +894,10 @@ static bool CheckGetLineFromStream()
bool ret = true;
for (long size = 1; size <= 5; ++size) {
for (size_t size = 1; size <= 5; ++size) {
file.seekg(0, std::ios::beg);
result =
kwsys::SystemTools::GetLineFromStream(file, line, &has_newline, size);
result = kwsys::SystemTools::GetLineFromStream(file, line, &has_newline,
static_cast<long>(size));
if (!result || line.size() != size) {
std::cerr << "Should have read " << size << " characters but got "
<< line.size() << std::endl;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment