Fixed a few visual analyzer warnings

This commit is contained in:
Yann Collet
2015-07-04 23:10:40 -08:00
parent 7393c5a51d
commit 94f998b1fc
3 changed files with 17 additions and 10 deletions
+6
View File
@@ -206,6 +206,12 @@ static int basicUnitTests(U32 seed, double compressibility)
CNBuffer = malloc(COMPRESSIBLE_NOISE_LENGTH);
compressedBuffer = malloc(ZSTD_compressBound(COMPRESSIBLE_NOISE_LENGTH));
decodedBuffer = malloc(COMPRESSIBLE_NOISE_LENGTH);
if (!CNBuffer || !compressedBuffer || !decodedBuffer)
{
DISPLAY("Not enough memory, aborting\n");
testResult = 1;
goto _end;
}
FUZ_generateSynthetic(CNBuffer, COMPRESSIBLE_NOISE_LENGTH, compressibility, &randState);
// Basic tests
+2
View File
@@ -281,6 +281,7 @@ int main(int argc, char** argv)
{
size_t l = strlen(inFileName);
dynNameSpace = (char*)calloc(1,l+5);
if (dynNameSpace==NULL) { DISPLAY("not enough memory\n"); exit(1); }
strcpy(dynNameSpace, inFileName);
strcpy(dynNameSpace+l, ZSTD_EXTENSION);
outFileName = dynNameSpace;
@@ -292,6 +293,7 @@ int main(int argc, char** argv)
size_t outl;
size_t inl = strlen(inFileName);
dynNameSpace = (char*)calloc(1,inl+1);
if (dynNameSpace==NULL) { DISPLAY("not enough memory\n"); exit(1); }
outFileName = dynNameSpace;
strcpy(dynNameSpace, inFileName);
outl = inl;