@@ -100,7 +100,7 @@ CHIP_ERROR ExportStoredOpKey(FabricIndex fabricIndex, PersistentStorageDelegate
100100 ReturnErrorOnFailure (
101101 storage->SyncGetKeyValue (DefaultStorageKeyAllocator::FabricOpKey (fabricIndex).KeyName (), buf.Bytes (), size));
102102
103- buf.SetLength (static_cast <size_t >(size));
103+ TEMPORARY_RETURN_IGNORED buf.SetLength (static_cast <size_t >(size));
104104
105105 // Read-out the operational key TLV entry.
106106 TLV ::ContiguousBufferTLVReader reader;
@@ -126,10 +126,8 @@ CHIP_ERROR ExportStoredOpKey(FabricIndex fabricIndex, PersistentStorageDelegate
126126 ReturnErrorOnFailure (reader.ExitContainer (containerType));
127127
128128 memcpy (serializedOpKey.Bytes (), keyData.data (), keyData.size ());
129- serializedOpKey.SetLength (keyData.size ());
129+ return serializedOpKey.SetLength (keyData.size ());
130130 }
131-
132- return CHIP_NO_ERROR ;
133131}
134132
135133/* * WARNING: This can leave the operational key on the stack somewhere, since many of the platform
@@ -212,7 +210,7 @@ CHIP_ERROR PersistentStorageOperationalKeystore::NewOpKeypairForFabric(FabricInd
212210 mPendingKeypair = Platform::New<Crypto::P256Keypair>();
213211 VerifyOrReturnError (mPendingKeypair != nullptr , CHIP_ERROR_NO_MEMORY );
214212
215- mPendingKeypair ->Initialize (Crypto::ECPKeyTarget::ECDSA );
213+ TEMPORARY_RETURN_IGNORED mPendingKeypair ->Initialize (Crypto::ECPKeyTarget::ECDSA );
216214 size_t csrLength = outCertificateSigningRequest.size ();
217215 CHIP_ERROR err = mPendingKeypair ->NewCertificateSigningRequest (outCertificateSigningRequest.data (), csrLength);
218216 if (err != CHIP_NO_ERROR )
0 commit comments