Skip to content
Snippets Groups Projects
Commit 3f832dfb authored by Ben Dooks's avatar Ben Dooks Committed by Nick Terrell
Browse files

zstd: fix g_debuglevel export warning


The g_debuglevel variable in debug.c is only used when DEBUGLEVEL is
defined to be above 2. This means by default there's no actual definition
of this in the headers, so sparse is giving the following warning:

lib/zstd/common/debug.c:24:5: warning: symbol 'g_debuglevel' was not declared. Should it be static?

We can use the same check as in the header to remove this if it isn't
going to be used, silencing the warning and removing a small bit of unused
data.

Signed-off-by: default avatarBen Dooks <ben.dooks@codethink.co.uk>
Signed-off-by: default avatarNick Terrell <terrelln@fb.com>
parent 40eb0e91
No related branches found
No related tags found
No related merge requests found
......@@ -22,4 +22,6 @@
#include "debug.h"
#if (DEBUGLEVEL>=2)
int g_debuglevel = DEBUGLEVEL;
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment