Fix MSVC warnings

This commit is contained in:
Zhi Guan
2022-10-12 18:05:05 +08:00
parent 50cefed24a
commit e25f8b945e
15 changed files with 61 additions and 63 deletions

View File

@@ -58,7 +58,6 @@ int certgen_main(int argc, char **argv)
size_t namelen;
time_t not_before;
time_t not_after;
uint8_t uniq_id[32];
uint8_t exts[512];
size_t extslen = 0;
FILE *keyfp = NULL;

View File

@@ -55,16 +55,7 @@ int cmssign_main(int argc, char **argv)
uint8_t *cms = NULL;
size_t cmslen, cms_maxlen;
CMS_CERTS_AND_KEY cert_and_key;
int content_type;
uint8_t *content = NULL;
size_t content_len;
const uint8_t *rcpt_infos;
size_t rcpt_infos_len;
const uint8_t *shared_info1;
const uint8_t *shared_info2;
size_t shared_info1_len, shared_info2_len;
argc--;
argv++;

View File

@@ -29,7 +29,6 @@ int rand_main(int argc, char **argv)
char *outfile = NULL;
FILE *outfp = stdout;
uint8_t buf[2048];
int i;
argc--;
argv++;
@@ -79,7 +78,7 @@ bad:
goto end;
}
while (outlen) {
while (outlen > 0) {
size_t len = outlen < sizeof(buf) ? outlen : sizeof(buf);
if (rdrand) {
@@ -107,7 +106,7 @@ bad:
goto end;
}
}
outlen -= len;
outlen -= (int)len;
}
if (hex) {
fprintf(outfp, "\n");