]> git.saurik.com Git - apt.git/commit
avoid triggering gcc's -Wunsafe-loop-optimizations in EDSP
authorDavid Kalnischkies <david@kalnischkies.de>
Mon, 2 May 2016 16:25:58 +0000 (18:25 +0200)
committerDavid Kalnischkies <david@kalnischkies.de>
Fri, 20 May 2016 12:18:36 +0000 (14:18 +0200)
commita6f8c07f83e4e5a8155c04feab543dc0c82ed495
treec4430a4fe7d31e618cc46fde90c1e992d5617b92
parentaf859f09084b4f6163501f216ba8cc2356fb3f93
avoid triggering gcc's -Wunsafe-loop-optimizations in EDSP

apt/apt-pkg/edsp.cc: In function ‘bool EDSP::WriteLimitedScenario(pkgDepCache&, FILE*, const PackageSet&, OpProgress*)’:
apt/apt-pkg/edsp.cc:245:56: warning: cannot optimize loop, the loop counter may overflow [-Wunsafe-loop-optimizations]
    std::string dependencies[pkgCache::Dep::Enhances + 1];
                                                        ^
Using a std::array to silence gcc as well as as a code improvement feels right here.

Git-Dch: Ignore
apt-pkg/edsp.cc