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

@@ -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");