From: Francis Dupont Date: Mon, 9 Jan 2017 22:19:08 +0000 (+0100) Subject: [master] Tentative fix for Clang static analyzer X-Git-Tag: trac4096_base X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=837ed7397ab8621f35a87b4e22a97b9f2812a055;p=thirdparty%2Fkea.git [master] Tentative fix for Clang static analyzer --- diff --git a/src/bin/perfdhcp/tests/perf_pkt6_unittest.cc b/src/bin/perfdhcp/tests/perf_pkt6_unittest.cc index 54bddc3d9d..15d073f6fc 100644 --- a/src/bin/perfdhcp/tests/perf_pkt6_unittest.cc +++ b/src/bin/perfdhcp/tests/perf_pkt6_unittest.cc @@ -275,6 +275,9 @@ TEST_F(PerfPkt6Test, PackTransactionId) { const uint8_t *out_buf_data = static_cast (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));