]> git.saurik.com Git - apt.git/commit - apt-pkg/sourcelist.cc
Fix an obscure warning from GCC
authorJulian Andres Klode <jak@debian.org>
Tue, 11 Aug 2015 09:05:57 +0000 (11:05 +0200)
committerJulian Andres Klode <jak@debian.org>
Tue, 11 Aug 2015 11:59:15 +0000 (13:59 +0200)
commitc9d715346cae0bd53264d7c25d5af79ca6365707
tree78b6e5d8f5fdc2c6cca1c8d436cc148e4d7d8da6
parent1d203ce78e6f80792e8c1f99701ff1b1daca534c
Fix an obscure warning from GCC

It complained about the previous code:

apt-pkg/sourcelist.cc: In destructor ‘pkgSourceList::~pkgSourceList()’:
apt-pkg/sourcelist.cc:278:4: warning: cannot optimize loop, the loop counter may overflow [-Wunsafe-loop-optimizations]
    for (pkgIndexFile * const File : VolatileFiles)
    ^
There really cannot be an overflow, though. Rewriting it like this
seems to fix it.
apt-pkg/sourcelist.cc