<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Incorrect use of abs() in unittests/Support/TimeValue.cpp"
href="http://llvm.org/bugs/show_bug.cgi?id=16918">16918</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Incorrect use of abs() in unittests/Support/TimeValue.cpp
</td>
</tr>
<tr>
<th>Product</th>
<td>Test Suite
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Nightly Tester
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>s_llvm@nedprod.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>--- a/unittests/Support/TimeValue.cpp
+++ b/unittests/Support/TimeValue.cpp
@@ -17,7 +17,7 @@ namespace {
TEST(Support, TimeValue) {
sys::TimeValue now = sys::TimeValue::now();
time_t now_t = time(NULL);
- EXPECT_TRUE(abs(static_cast<long>(now_t - now.toEpochTime())) < 2);
+ EXPECT_TRUE(labs(static_cast<long>(now_t - now.toEpochTime())) < 2);
}
}
Yeah I know this is incredibly pedantic, but it actually failed here in a
native QNX build. The labs() is the correct one to use.
Niall</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>