Commit bbc4af7a authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull Clang build fix from Nathan Chancellor:

 - Wrap declaration and assignment of key_pass in certs/extract-cert.c
   with '#ifdef' that matches its only usage to clear up an instance of
   a new clang subwarning, -Wunused-but-set-global.

* tag 'clang-fixes-7.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/nathan/linux:
  extract-cert: Wrap key_pass with '#ifdef USE_PKCS11_ENGINE'
parents eefe0b9d 4f96b7c6
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -41,7 +41,9 @@ void format(void)
	exit(2);
}

#ifdef USE_PKCS11_ENGINE
static const char *key_pass;
#endif
static BIO *wb;
static char *cert_dst;
static bool verbose;
@@ -133,7 +135,9 @@ int main(int argc, char **argv)
	if (verbose_env && strchr(verbose_env, '1'))
		verbose = true;

#ifdef USE_PKCS11_ENGINE
	key_pass = getenv("KBUILD_SIGN_PIN");
#endif

	if (argc != 3)
		format();