From 1bbc80d4517adc8cad50a8984a04ea1d9b5ec84c Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Thu, 3 Oct 2024 17:02:45 +0100 Subject: [PATCH] tools/depmod: cast variable in DBG() statement Older versions of clang (14.0.0 as seen in Ubuntu 22.04) will flag a warning that we're using unsigned int, with a unsigned char modifier. Newer versions like 16.0.6 (Debian unstable), 17.0.6 (Alpine), etc do not flag this as an issue. In practise the number fits in the latter range, so just add a cast to silence the warning. Signed-off-by: Emil Velikov Link: https://github.com/kmod-project/kmod/pull/172 Signed-off-by: Lucas De Marchi --- tools/depmod.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/depmod.c b/tools/depmod.c index 9461dddd..d71c31b7 100644 --- a/tools/depmod.c +++ b/tools/depmod.c @@ -504,7 +504,7 @@ static int cfg_search_add(struct cfg *cfg, const char *path) memcpy(s->path, path, len); } - DBG("search add: %s, search type=%hhu\n", path, type); + DBG("search add: %s, search type=%hhu\n", path, (unsigned char)type); s->next = cfg->searches; cfg->searches = s; -- 2.47.3