From: Karel Zak Date: Tue, 13 Jan 2026 12:23:39 +0000 (+0100) Subject: blkpr: fix compilation [-Werror,-Wunused-function] X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6cac3fd97407776dcaf3c96aefd978e018b2ca6f;p=thirdparty%2Futil-linux.git blkpr: fix compilation [-Werror,-Wunused-function] sys-utils/blkpr.c:171:27: error: unused function 'type_to_str' [-Werror,-Wunused-function] Signed-off-by: Karel Zak --- diff --git a/sys-utils/blkpr.c b/sys-utils/blkpr.c index dfa18f783..5e5e107e3 100644 --- a/sys-utils/blkpr.c +++ b/sys-utils/blkpr.c @@ -168,17 +168,6 @@ static int parse_type_by_str(const struct type_string *ts, int nmem, char *patte return -1; } -static inline const char *type_to_str(const struct type_string *ts, int nmem, - int type) -{ - int i; - - for (i = 0; i < nmem; i++) { - if (ts[i].type == type) - return ts[i].str; - } - return "unknown type"; -} #define PRINT_SUPPORTED(XX) \ @@ -233,6 +222,18 @@ out: #endif /* IOC_PR_READ_KEYS */ #ifdef IOC_PR_READ_RESERVATION +static inline const char *type_to_str(const struct type_string *ts, int nmem, + int type) +{ + int i; + + for (i = 0; i < nmem; i++) { + if (ts[i].type == type) + return ts[i].str; + } + return "unknown type"; +} + static int do_pr_read_reservation(int fd) { struct pr_read_reservation pr_rr;