lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230616144400.172683-1-ben.dooks@codethink.co.uk>
Date:   Fri, 16 Jun 2023 15:44:00 +0100
From:   Ben Dooks <ben.dooks@...ethink.co.uk>
To:     linux-kernel@...r.kernel.org, Nick Terrell <terrelln@...com>
Cc:     Ben Dooks <ben.dooks@...ethink.co.uk>
Subject: [PATCH] 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: Ben Dooks <ben.dooks@...ethink.co.uk>
---
 lib/zstd/common/debug.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/zstd/common/debug.c b/lib/zstd/common/debug.c
index bb863c9ea616..820520b93d2b 100644
--- a/lib/zstd/common/debug.c
+++ b/lib/zstd/common/debug.c
@@ -21,4 +21,6 @@
 
 #include "debug.h"
 
+#if (DEBUGLEVEL>=2)
 int g_debuglevel = DEBUGLEVEL;
+#endif
-- 
2.39.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ