mirror of
https://github.com/facebook/zstd.git
synced 2025-07-07 08:05:38 +02:00
[contrib][linux-kernel] Add standard warnings and -Werror to CI
Test the kernel build with the standard warnings enabled so that we don't miss issues like fixed in PR #2802. Stacked on top of PR #2802 so CI passes, so it includes the fix. But, I won't merge until it is merged, so @solbjorn gets the credit for the fix.
This commit is contained in:
@ -28,17 +28,19 @@ static const char kEmptyZstdFrame[] = {
|
||||
0x28, 0xb5, 0x2f, 0xfd, 0x24, 0x00, 0x01, 0x00, 0x00, 0x99, 0xe9, 0xd8, 0x51
|
||||
};
|
||||
|
||||
static void test_decompress_unzstd() {
|
||||
static void test_decompress_unzstd(void) {
|
||||
fprintf(stderr, "Testing decompress unzstd... ");
|
||||
{
|
||||
size_t const wkspSize = zstd_dctx_workspace_bound();
|
||||
void* wksp = malloc(wkspSize);
|
||||
CONTROL(wksp != NULL);
|
||||
ZSTD_DCtx* dctx = zstd_init_dctx(wksp, wkspSize);
|
||||
CONTROL(wksp != NULL);
|
||||
CONTROL(dctx != NULL);
|
||||
size_t const dSize = zstd_decompress_dctx(dctx, NULL, 0, kEmptyZstdFrame, sizeof(kEmptyZstdFrame));
|
||||
CONTROL(!zstd_is_error(dSize));
|
||||
CONTROL(dSize == 0);
|
||||
{
|
||||
size_t const dSize = zstd_decompress_dctx(dctx, NULL, 0, kEmptyZstdFrame, sizeof(kEmptyZstdFrame));
|
||||
CONTROL(!zstd_is_error(dSize));
|
||||
CONTROL(dSize == 0);
|
||||
}
|
||||
free(wksp);
|
||||
}
|
||||
fprintf(stderr, "Ok\n");
|
||||
|
Reference in New Issue
Block a user