diff mbox

crda: Fix error: `keys’ defined but not used

Message ID 20171204205239.6296-1-jelle@vdwaa.nl (mailing list archive)
State Not Applicable
Delegated to: Kalle Valo
Headers show

Commit Message

Jelle van der Waa Dec. 4, 2017, 8:52 p.m. UTC
Fix error: ‘keys’ defined but not used [-Werror=unused-const-variable=]
by informing GCC keys is unused.

Signed-off-by: Jelle van der Waa <jelle@vdwaa.nl>
---
 utils/key2pub.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Luis Chamberlain Jan. 5, 2018, 7:13 p.m. UTC | #1
On Mon, Dec 04, 2017 at 09:52:39PM +0100, Jelle van der Waa wrote:
> Fix error: ‘keys’ defined but not used [-Werror=unused-const-variable=]
> by informing GCC keys is unused.
> 
> Signed-off-by: Jelle van der Waa <jelle@vdwaa.nl>

Thanks, applied and pushed! Although this just fixes a compilation
warning, but since we do use -Werror and thus force any error to
fail compilation I've pushed out a new release with this fix
merged as v4.14.

If a new tarball is not kicked off soon [0] automatically I'll poke and see to
it. Note that as of kernel v4.15 (as of commit 007f6c5e6eb45 ("cfg80211:
support loading regulatory database as firmware file" we have the ability
now for the kernel to do this file lookup for us first, and only if
that fails will CRDA kick in.

[0] https://www.kernel.org/pub/software/network/crda/

  Luis
diff mbox

Patch

diff --git a/utils/key2pub.py b/utils/key2pub.py
index 3e84cd2..9bb04cd 100755
--- a/utils/key2pub.py
+++ b/utils/key2pub.py
@@ -115,7 +115,7 @@  struct key_params {
 	.n = _n, .len_n = sizeof(_n),	\
 }
 
-static const struct key_params keys[] = {
+static const struct key_params __attribute__ ((unused)) keys[] = {
 ''')
     for n in xrange(n + 1):
         output.write('	KEYS(e_%d, n_%d),\n' % (n, n))