summaryrefslogtreecommitdiffstats
path: root/CryptoPkg/Library
diff options
context:
space:
mode:
authorPeter Jones <pjones@redhat.com>2017-10-20 23:10:18 +0800
committerLong Qin <qin.long@intel.com>2017-10-24 15:20:22 +0800
commitb5a985ca9237b551618cd97b1b71af2fff55e209 (patch)
tree0b0bfa2788b15c2776b6fa28f4a56e97815a9ca2 /CryptoPkg/Library
parent34cd44d4dea2ac5bba88515ed11beb5e61bf37ea (diff)
downloadedk2-b5a985ca9237b551618cd97b1b71af2fff55e209.tar.gz
edk2-b5a985ca9237b551618cd97b1b71af2fff55e209.tar.bz2
edk2-b5a985ca9237b551618cd97b1b71af2fff55e209.zip
CryptoPkg/BaseCryptLib: remove some duplicate initializations.
clang-analyzer noticed this: Pk/CryptPkcs7Verify.c:600:5: warning: Value stored to 'OldSize' is never read OldSize = BufferSize; ^ ~~~~~~~~~~ Pk/CryptPkcs7Verify.c:644:5: warning: Value stored to 'OldSize' is never read OldSize = BufferSize; ^ ~~~~~~~~~~ 2 warnings generated. These are each immediately followed by a loop that initializes them (to the same values) a second time, and are otherwise only referenced inside that loop, so there's just no point to these assignments at all. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Peter Jones <pjones@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Long Qin <qin.long@intel.com>
Diffstat (limited to 'CryptoPkg/Library')
-rw-r--r--CryptoPkg/Library/BaseCryptLib/Pk/CryptPkcs7Verify.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/CryptoPkg/Library/BaseCryptLib/Pk/CryptPkcs7Verify.c b/CryptoPkg/Library/BaseCryptLib/Pk/CryptPkcs7Verify.c
index d564591cb7..bf67a1f569 100644
--- a/CryptoPkg/Library/BaseCryptLib/Pk/CryptPkcs7Verify.c
+++ b/CryptoPkg/Library/BaseCryptLib/Pk/CryptPkcs7Verify.c
@@ -612,7 +612,6 @@ Pkcs7GetCertificatesList (
if (CtxChain != NULL) {
BufferSize = sizeof (UINT8);
- OldSize = BufferSize;
CertBuf = NULL;
for (Index = 0; ; Index++) {
@@ -656,7 +655,6 @@ Pkcs7GetCertificatesList (
if (CtxUntrusted != NULL) {
BufferSize = sizeof (UINT8);
- OldSize = BufferSize;
CertBuf = NULL;
for (Index = 0; ; Index++) {