]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[master] Tentative fix for Clang static analyzer trac4096_base trac5096_base
authorFrancis Dupont <fdupont@isc.org>
Mon, 9 Jan 2017 22:19:08 +0000 (23:19 +0100)
committerFrancis Dupont <fdupont@isc.org>
Mon, 9 Jan 2017 22:19:08 +0000 (23:19 +0100)
src/bin/perfdhcp/tests/perf_pkt6_unittest.cc

index 54bddc3d9d3fbc613d9e9712cfe34f391f23779b..15d073f6fcc06657c7a2a89e9aa11762822c10f0 100644 (file)
@@ -275,6 +275,9 @@ TEST_F(PerfPkt6Test, PackTransactionId) {
     const uint8_t *out_buf_data = static_cast<const uint8_t*>
         (out_buf.getData());
 
+    // Try to make clang static analyzer happy.
+    ASSERT_LE(offset_transid[0], out_buf.getLength());
+
     // Validate transaction id.
     EXPECT_EQ(0, memcmp(out_buf_data + offset_transid[0], ref_data, 3));