From: Shreenidhi Shedi Date: Mon, 9 Aug 2021 04:58:06 +0000 (+0530) Subject: fix(install): use size_t to avoid -Wsign-compare warning X-Git-Tag: 056~114 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=55468a2d40182de4cce5ba4ecd5dcd96be03bd4d;p=thirdparty%2Fdracut.git fix(install): use size_t to avoid -Wsign-compare warning Signed-off-by: Shreenidhi Shedi --- diff --git a/src/install/dracut-install.c b/src/install/dracut-install.c index 1e624978a..f1e76bef1 100644 --- a/src/install/dracut-install.c +++ b/src/install/dracut-install.c @@ -1314,7 +1314,7 @@ static int install_all(int argc, char **argv) ret = glob(realsrc, 0, NULL, &globbuf); if (ret == 0) { - int j; + size_t j; for (j = 0; j < globbuf.gl_pathc; j++) { char *dest = strdup(globbuf.gl_pathv[j] + sysrootdirlen); @@ -1388,8 +1388,9 @@ static int install_firmware(struct kmod_module *mod) if ((strstr(value, "*") != 0 || strstr(value, "?") != 0 || strstr(value, "[") != 0) && stat(fwpath, &sb) != 0) { - int i; + size_t i; _cleanup_globfree_ glob_t globbuf; + glob(fwpath, 0, NULL, &globbuf); for (i = 0; i < globbuf.gl_pathc; i++) { ret = install_firmware_fullpath(globbuf.gl_pathv[i]);