mirror of
https://github.com/facebook/zstd.git
synced 2026-01-06 11:21:19 +03:00
[debug] Don't define g_debuglevel in the kernel
We only use this constant when `DEBUGLEVEL>=2`, but we get -Werror=pedantic errors for empty translation units, so still define it except in kernel environments. Backport from the kernel: https://lore.kernel.org/lkml/20230616144400.172683-1-ben.dooks@codethink.co.uk/
This commit is contained in:
committed by
Nick Terrell
parent
c2d470581e
commit
e122fcbf58
@@ -21,4 +21,10 @@
|
||||
|
||||
#include "debug.h"
|
||||
|
||||
#if !defined(ZSTD_LINUX_KERNEL) || (DEBUGLEVEL>=2)
|
||||
/* We only use this when DEBUGLEVEL>=2, but we get -Werror=pedantic errors if a
|
||||
* translation unit is empty. So remove this from Linux kernel builds, but
|
||||
* otherwise just leave it in.
|
||||
*/
|
||||
int g_debuglevel = DEBUGLEVEL;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user