tests: fix dangling-reference warning with gcc 13

Change-Id: I73531e291d9b3146f3778c21a262d328d98eb26b
This commit is contained in:
Davide Pesavento committed 2023-02-15 14:15:06 -05:00
1 parent ae39daf4de
commit d09d52bdfa
1 file changed
+3 -2
+3 -2
View File
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2013-2022 Regents of the University of California.
* Copyright (c) 2013-2023 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -381,7 +381,8 @@ class IdCertFixture : public FileIoFixture
BOOST_FIXTURE_TEST_CASE(IdCert, IdCertFixture)
{
auto identity = m_keyChain.createIdentity("/TestIo/IdCert", RsaKeyParams());
const auto& cert = identity.getDefaultKey().getDefaultCertificate();
auto key = identity.getDefaultKey();
const auto& cert = key.getDefaultCertificate();
io::save(cert, filename);
auto readCert = io::load<security::Certificate>(filename);