From bce0e0ff327341da3ad54d7ea2bb6d82b3f96879 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 17 Apr 2012 23:47:35 +0200 Subject: [PATCH] newer gcc versions seems to have no problem with that, but while working with g++-4.1 it complains about this so lets be extra clear --- apt-pkg/cacheset.h | 4 ++-- methods/http.cc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apt-pkg/cacheset.h b/apt-pkg/cacheset.h index 6f0a0e35..5b990060 100644 --- a/apt-pkg/cacheset.h +++ b/apt-pkg/cacheset.h @@ -186,7 +186,7 @@ public: /*{{{*/ pkgCache::PkgIterator getPkg(void) const { return *_iter; } inline pkgCache::PkgIterator operator*(void) const { return *_iter; }; operator typename Container::iterator(void) const { return _iter; } - operator typename PackageContainer::const_iterator() { return PackageContainer::const_iterator(_iter); } + operator typename PackageContainer::const_iterator() { return typename PackageContainer::const_iterator(_iter); } inline iterator& operator++() { ++_iter; return *this; } inline iterator operator++(int) { iterator tmp(*this); operator++(); return tmp; } inline bool operator!=(iterator const &i) const { return _iter != i._iter; }; @@ -506,7 +506,7 @@ public: /*{{{*/ pkgCache::VerIterator getVer(void) const { return *_iter; } inline pkgCache::VerIterator operator*(void) const { return *_iter; }; operator typename Container::iterator(void) const { return _iter; } - operator typename VersionContainer::const_iterator() { return VersionContainer::const_iterator(_iter); } + operator typename VersionContainer::const_iterator() { return typename VersionContainer::const_iterator(_iter); } inline iterator& operator++() { ++_iter; return *this; } inline iterator operator++(int) { iterator tmp(*this); operator++(); return tmp; } inline bool operator!=(iterator const &i) const { return _iter != i._iter; }; diff --git a/methods/http.cc b/methods/http.cc index c62ca71d..b450b6ff 100644 --- a/methods/http.cc +++ b/methods/http.cc @@ -602,7 +602,7 @@ bool ServerState::HeaderLine(string Line) return true; Size = strtoull(Val.c_str(), NULL, 10); - if (Size == ULLONG_MAX) + if (Size >= std::numeric_limits::max()) return _error->Errno("HeaderLine", _("The HTTP server sent an invalid Content-Length header")); return true; } -- 2.20.1