From: Emil Velikov Date: Thu, 3 Oct 2024 16:02:45 +0000 (+0100) Subject: tools/depmod: cast variable in DBG() statement X-Git-Tag: v34~257 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1bbc80d4517adc8cad50a8984a04ea1d9b5ec84c;p=thirdparty%2Fkmod.git 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 --- 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;