Commit 0470cfd9 authored by Marcin Siodelski's avatar Marcin Siodelski
Browse files

[3161] Use smart pointer to supress clang static analyzer error.

The static analyzer indicated that the dereferenced object could
be NULL but in fact it is not. However, it is still safer to use
smart pointer, rather than raw pointer, so I updated the test.
parent 0e67d8e0
// Copyright (C) 2011-2015 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2011-2016 Internet Systems Consortium, Inc. ("ISC")
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
......@@ -291,8 +291,9 @@ TEST_F(Option6IATest, suboptionsUnpack) {
ASSERT_NE(OptionPtr(), subopt); // non-NULL
// Checks for address option
Option6IAAddr * addr = dynamic_cast<Option6IAAddr*>(subopt.get());
Option6IAAddrPtr addr =
EXPECT_EQ(D6O_IAADDR, addr->getType());
EXPECT_EQ(28, addr->len());
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment