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>
			
			
This commit is contained in:
		@@ -612,7 +612,6 @@ Pkcs7GetCertificatesList (
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  if (CtxChain != NULL) {
 | 
					  if (CtxChain != NULL) {
 | 
				
			||||||
    BufferSize = sizeof (UINT8);
 | 
					    BufferSize = sizeof (UINT8);
 | 
				
			||||||
    OldSize    = BufferSize;
 | 
					 | 
				
			||||||
    CertBuf    = NULL;
 | 
					    CertBuf    = NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    for (Index = 0; ; Index++) {
 | 
					    for (Index = 0; ; Index++) {
 | 
				
			||||||
@@ -656,7 +655,6 @@ Pkcs7GetCertificatesList (
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  if (CtxUntrusted != NULL) {
 | 
					  if (CtxUntrusted != NULL) {
 | 
				
			||||||
    BufferSize = sizeof (UINT8);
 | 
					    BufferSize = sizeof (UINT8);
 | 
				
			||||||
    OldSize    = BufferSize;
 | 
					 | 
				
			||||||
    CertBuf    = NULL;
 | 
					    CertBuf    = NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    for (Index = 0; ; Index++) {
 | 
					    for (Index = 0; ; Index++) {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user