From e59c84ca3a06203abbc29742cf8c4133c14e0a23 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Tue, 14 May 2024 17:45:49 +0200 Subject: [PATCH] gcc: clean cast with -Wbad-function-cast Makes gcc happier. --- lib/device/dev-mpath.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/device/dev-mpath.c b/lib/device/dev-mpath.c index a6896ec42..eb171d3a1 100644 --- a/lib/device/dev-mpath.c +++ b/lib/device/dev-mpath.c @@ -560,7 +560,8 @@ static int _dev_is_mpath_component_sysfs(struct cmd_context *cmd, struct device */ if (_minor_hash_tab) { - long look = (long) dm_hash_lookup_binary(_minor_hash_tab, &dm_dev_minor, sizeof(dm_dev_minor)); + void *d = dm_hash_lookup_binary(_minor_hash_tab, &dm_dev_minor, sizeof(dm_dev_minor)); + long look = (long) d; if (look > 0) { log_debug_devs("dev_is_mpath_component %s holder %s %u:%u already checked as %sbeing mpath.", dev_name(dev), holder_name, dm_dev_major, dm_dev_minor, (look > 1) ? "" : "not ");