Просмотр исходного кода

fix compiler warning about sign-compare

This fix avoids the warning "comparison between signed and unsigned
integer expressions [-Wsign-compare]". The index for the loop
needs to be unsigned for compare with globbuf.gl_pathc structure
member.
Angel Guzman Maeso лет назад: 13
Родитель
Сommit
7e02baf61f
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      apt-pkg/contrib/fileutl.cc

+ 2 - 1
apt-pkg/contrib/fileutl.cc

@@ -1777,7 +1777,8 @@ std::vector<std::string> Glob(std::string const &pattern, int flags)
 {
    std::vector<std::string> result;
    glob_t globbuf;
-   int glob_res, i;
+   int glob_res;
+   unsigned int i;
 
    glob_res = glob(pattern.c_str(),  flags, NULL, &globbuf);