소스 검색

apt-pkg:contrib Avoid compiler warning about sign-compare

The fix avoid 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
Ángel Guzmán Maeso 13 년 전
부모
커밋
ec4835a14a
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;
    std::vector<std::string> result;
    glob_t globbuf;
    glob_t globbuf;
-   int glob_res, i;
+   int glob_res;
+   unsigned int i;
 
 
    glob_res = glob(pattern.c_str(),  flags, NULL, &globbuf);
    glob_res = glob(pattern.c_str(),  flags, NULL, &globbuf);