onlineupdate: -Werror=unused-but-set-variable
Change-Id: I136eb25d2831cdbd3f1ce81714039cbd28b16577
This commit is contained in:
@@ -262,7 +262,7 @@ strip_signature_block(const char *src, const char * dest)
|
||||
FILE *fpSrc = NULL, *fpDest = NULL;
|
||||
int rv = -1, hasSignatureBlock;
|
||||
char buf[BLOCKSIZE];
|
||||
char *indexBuf = NULL, *indexBufLoc;
|
||||
char *indexBuf = NULL;
|
||||
|
||||
if (!src || !dest) {
|
||||
fprintf(stderr, "ERROR: Invalid parameter passed in.\n");
|
||||
@@ -432,7 +432,6 @@ strip_signature_block(const char *src, const char * dest)
|
||||
|
||||
/* Consume the index and adjust each index by the difference */
|
||||
indexBuf = malloc(indexLength);
|
||||
indexBufLoc = indexBuf;
|
||||
if (fread(indexBuf, indexLength, 1, fpSrc) != 1) {
|
||||
fprintf(stderr, "ERROR: Could not read index\n");
|
||||
goto failure;
|
||||
@@ -836,7 +835,7 @@ mar_repackage_and_sign(const char *NSSConfigDir,
|
||||
char buf[BLOCKSIZE];
|
||||
SECKEYPrivateKey *privKeys[MAX_SIGNATURES];
|
||||
CERTCertificate *certs[MAX_SIGNATURES];
|
||||
char *indexBuf = NULL, *indexBufLoc;
|
||||
char *indexBuf = NULL;
|
||||
uint32_t k;
|
||||
|
||||
memset(signatureLengths, 0, sizeof(signatureLengths));
|
||||
@@ -1058,7 +1057,6 @@ mar_repackage_and_sign(const char *NSSConfigDir,
|
||||
|
||||
/* Consume the index and adjust each index by signatureSectionLength */
|
||||
indexBuf = malloc(indexLength);
|
||||
indexBufLoc = indexBuf;
|
||||
if (fread(indexBuf, indexLength, 1, fpSrc) != 1) {
|
||||
fprintf(stderr, "ERROR: Could not read index\n");
|
||||
goto failure;
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <fcntl.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include "mar_private.h"
|
||||
#include "mar.h"
|
||||
#include "cryptox.h"
|
||||
@@ -197,7 +198,6 @@ mar_extract_and_verify_signatures_fp(FILE *fp,
|
||||
uint32_t signatureCount, signatureLen, numVerified = 0;
|
||||
uint32_t signatureAlgorithmIDs[MAX_SIGNATURES];
|
||||
int rv = -1;
|
||||
int64_t curPos;
|
||||
uint8_t *extractedSignatures[MAX_SIGNATURES];
|
||||
uint32_t i;
|
||||
|
||||
@@ -285,7 +285,6 @@ mar_extract_and_verify_signatures_fp(FILE *fp,
|
||||
}
|
||||
}
|
||||
|
||||
curPos = ftello(fp);
|
||||
rv = mar_verify_signatures_for_fp(fp,
|
||||
provider,
|
||||
keys,
|
||||
@@ -299,6 +298,7 @@ mar_extract_and_verify_signatures_fp(FILE *fp,
|
||||
/* If we reached here and we verified every
|
||||
signature, return success. */
|
||||
if (numVerified == signatureCount && keyCount == numVerified) {
|
||||
assert(rv == 0); (void) rv;
|
||||
return CryptoX_Success;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user