From 08bc0a947a7d48ed89bd4e3d1216316007cd73d7 Mon Sep 17 00:00:00 2001 From: Stefan Haberland Date: Wed, 21 Feb 2018 13:15:12 +0100 Subject: [PATCH] zipl: fix some warnings in zipl_helper MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix some warnings found by sparse. Declare one function static and change static variables to defines. Signed-off-by: Stefan Haberland Signed-off-by: Jan Höppner --- zipl/src/zipl_helper.device-mapper.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/zipl/src/zipl_helper.device-mapper.c b/zipl/src/zipl_helper.device-mapper.c index ddec62c7..d60159d6 100644 --- a/zipl/src/zipl_helper.device-mapper.c +++ b/zipl/src/zipl_helper.device-mapper.c @@ -108,11 +108,11 @@ struct device_characteristics { #define BDEVNAME_SIZE 32 /* Constants */ -const unsigned int SECTOR_SIZE = 512; -const unsigned int DASD_PARTN_MASK = 0x03; -const unsigned int SCSI_PARTN_MASK = 0x0f; +#define SECTOR_SIZE 512 +#define DASD_PARTN_MASK 0x03 +#define SCSI_PARTN_MASK 0x0f -const char CHREIPL_HELPER[] = "chreipl_helper.device-mapper"; +#define CHREIPL_HELPER "chreipl_helper.device-mapper" /* Internal constants */ enum dev_type { @@ -951,7 +951,7 @@ static bool toolname_is_chreipl_helper(const char *toolname) return strcmp(toolname + tlen - clen, CHREIPL_HELPER) == 0; } -void print_usage(const char *toolname) +static void print_usage(const char *toolname) { fprintf(stderr, "%s ", toolname); if (!toolname_is_chreipl_helper(toolname))