mirror of
				https://github.com/facebook/zstd.git
				synced 2025-10-31 00:27:46 +02:00 
			
		
		
		
	fixed legacy compilation tests
for some reason, these tests started failing recently on CircleCI
This commit is contained in:
		| @@ -668,11 +668,17 @@ static size_t FSE_initDStream(FSE_DStream_t* bitD, const void* srcBuffer, size_t | ||||
|         switch(srcSize) | ||||
|         { | ||||
|             case 7: bitD->bitContainer += (size_t)(((const BYTE*)(bitD->start))[6]) << (sizeof(size_t)*8 - 16); | ||||
|                     /* fallthrough */ | ||||
|             case 6: bitD->bitContainer += (size_t)(((const BYTE*)(bitD->start))[5]) << (sizeof(size_t)*8 - 24); | ||||
|                     /* fallthrough */ | ||||
|             case 5: bitD->bitContainer += (size_t)(((const BYTE*)(bitD->start))[4]) << (sizeof(size_t)*8 - 32); | ||||
|                     /* fallthrough */ | ||||
|             case 4: bitD->bitContainer += (size_t)(((const BYTE*)(bitD->start))[3]) << 24; | ||||
|                     /* fallthrough */ | ||||
|             case 3: bitD->bitContainer += (size_t)(((const BYTE*)(bitD->start))[2]) << 16; | ||||
|                     /* fallthrough */ | ||||
|             case 2: bitD->bitContainer += (size_t)(((const BYTE*)(bitD->start))[1]) <<  8; | ||||
|                     /* fallthrough */ | ||||
|             default:; | ||||
|         } | ||||
|         contain32 = ((const BYTE*)srcBuffer)[srcSize-1]; | ||||
|   | ||||
| @@ -399,11 +399,17 @@ MEM_STATIC size_t BIT_initDStream(BIT_DStream_t* bitD, const void* srcBuffer, si | ||||
|         switch(srcSize) | ||||
|         { | ||||
|             case 7: bitD->bitContainer += (size_t)(((const BYTE*)(bitD->start))[6]) << (sizeof(size_t)*8 - 16); | ||||
|                     /* fallthrough */ | ||||
|             case 6: bitD->bitContainer += (size_t)(((const BYTE*)(bitD->start))[5]) << (sizeof(size_t)*8 - 24); | ||||
|                     /* fallthrough */ | ||||
|             case 5: bitD->bitContainer += (size_t)(((const BYTE*)(bitD->start))[4]) << (sizeof(size_t)*8 - 32); | ||||
|                     /* fallthrough */ | ||||
|             case 4: bitD->bitContainer += (size_t)(((const BYTE*)(bitD->start))[3]) << 24; | ||||
|                     /* fallthrough */ | ||||
|             case 3: bitD->bitContainer += (size_t)(((const BYTE*)(bitD->start))[2]) << 16; | ||||
|                     /* fallthrough */ | ||||
|             case 2: bitD->bitContainer += (size_t)(((const BYTE*)(bitD->start))[1]) <<  8; | ||||
|                     /* fallthrough */ | ||||
|             default:; | ||||
|         } | ||||
|         contain32 = ((const BYTE*)srcBuffer)[srcSize-1]; | ||||
|   | ||||
| @@ -402,11 +402,17 @@ MEM_STATIC size_t BIT_initDStream(BIT_DStream_t* bitD, const void* srcBuffer, si | ||||
|         switch(srcSize) | ||||
|         { | ||||
|             case 7: bitD->bitContainer += (size_t)(((const BYTE*)(bitD->start))[6]) << (sizeof(size_t)*8 - 16); | ||||
|                     /* fallthrough */ | ||||
|             case 6: bitD->bitContainer += (size_t)(((const BYTE*)(bitD->start))[5]) << (sizeof(size_t)*8 - 24); | ||||
|                     /* fallthrough */ | ||||
|             case 5: bitD->bitContainer += (size_t)(((const BYTE*)(bitD->start))[4]) << (sizeof(size_t)*8 - 32); | ||||
|                     /* fallthrough */ | ||||
|             case 4: bitD->bitContainer += (size_t)(((const BYTE*)(bitD->start))[3]) << 24; | ||||
|                     /* fallthrough */ | ||||
|             case 3: bitD->bitContainer += (size_t)(((const BYTE*)(bitD->start))[2]) << 16; | ||||
|                     /* fallthrough */ | ||||
|             case 2: bitD->bitContainer += (size_t)(((const BYTE*)(bitD->start))[1]) <<  8; | ||||
|                     /* fallthrough */ | ||||
|             default:; | ||||
|         } | ||||
|         contain32 = ((const BYTE*)srcBuffer)[srcSize-1]; | ||||
|   | ||||
| @@ -36,7 +36,7 @@ size_t const COMPRESSED_SIZE = 917; | ||||
| const char* const EXPECTED; /* content is at end of file */ | ||||
|  | ||||
|  | ||||
| int testSimpleAPI(void) | ||||
| static int testSimpleAPI(void) | ||||
| { | ||||
|     size_t const size = strlen(EXPECTED); | ||||
|     char* const output = malloc(size); | ||||
| @@ -71,7 +71,8 @@ int testSimpleAPI(void) | ||||
|     return 0; | ||||
| } | ||||
|  | ||||
| int testStreamingAPI(void) | ||||
|  | ||||
| static int testStreamingAPI(void) | ||||
| { | ||||
|     size_t const outBuffSize = ZSTD_DStreamOutSize(); | ||||
|     char* const outBuff = malloc(outBuffSize); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user