From 6cac3fd97407776dcaf3c96aefd978e018b2ca6f Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 13 Jan 2026 13:23:39 +0100 Subject: [PATCH] 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 --- sys-utils/blkpr.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) 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; -- 2.47.3