zconf/zcrypt: Fix sparse warnings

A compile with sparse (make C=1) shows a couple of warnings:
like:

  chzcrypt.c:36:3: warning: symbol 'l' was not declared.
  Should it be static?

  lszcrypt.c: In function 'show_device':
  lszcrypt.c:556:9: warning: 'card' may be used uninitialized
  [-Wmaybe-uninitialized]

Fix those warnings.

Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com>
Reviewed-by: Jan Hoeppner <hoeppner@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Ingo Franzki
2021-06-21 11:08:56 +02:00
committed by Jan Höppner
parent 9100d6f40e
commit 3e818c53b2
3 changed files with 16 additions and 22 deletions
+3 -5
View File
@@ -31,16 +31,14 @@
/*
* Private data
*/
struct chzcrypt_l {
static struct chzcrypt_l {
int verbose;
} l;
struct chzcrypt_l *chzcrypt_l = &l;
/*
* Program configuration
*/
const struct util_prg prg = {
static const struct util_prg prg = {
.desc = "Modify zcrypt configuration.",
.args = "[DEVICE_IDS]",
.copyright_vec = {
@@ -385,7 +383,7 @@ static void dev_list_argv(char **argz, size_t *len, char * const argv[])
/*
* Describe adapter ids
*/
void print_adapter_id_help(void)
static void print_adapter_id_help(void)
{
printf("\n");
printf("DEVICE_IDS\n");