From: Francesco Chemolli Date: Thu, 26 May 2011 17:06:00 +0000 (+0200) Subject: Portability fix: fix always-true comparison in ICAP for some 32-bit platforms X-Git-Tag: take08~55^2~173 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=46e172d9074f4547df380f7e151257936e786346;p=thirdparty%2Fsquid.git Portability fix: fix always-true comparison in ICAP for some 32-bit platforms --- diff --git a/configure.ac b/configure.ac index 06b053d219..21b0603fdc 100644 --- a/configure.ac +++ b/configure.ac @@ -2428,6 +2428,7 @@ AC_CHECK_SIZEOF(int64_t) AC_CHECK_SIZEOF(long) #need the define for overflow checks AC_CHECK_SIZEOF(off_t) +AC_CHECK_SIZEOF(size_t) dnl On Solaris 9 x86, gcc may includes a "fixed" set of old system include files dnl that is incompatible with the updated Solaris header files. diff --git a/src/adaptation/icap/ModXact.cc b/src/adaptation/icap/ModXact.cc index c7e55cd9d1..b5b3d17e23 100644 --- a/src/adaptation/icap/ModXact.cc +++ b/src/adaptation/icap/ModXact.cc @@ -1809,7 +1809,10 @@ void Adaptation::Icap::VirginBodyAct::disable() void Adaptation::Icap::VirginBodyAct::progress(size_t size) { Must(active()); +#if SIZEOF_SIZE_T > 4 + /* always true for smaller size_t's */ Must(static_cast(size) >= 0); +#endif theStart += static_cast(size); }