From: Patrick Welche Date: Wed, 29 Jun 2016 17:24:24 +0000 (-0600) Subject: Bug 4376: clang cannot build Squid eCAP code X-Git-Tag: SQUID_4_0_12~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=eaba85cb18cb384105b97e20245db3ecf629efa8;p=thirdparty%2Fsquid.git Bug 4376: clang cannot build Squid eCAP code This change is not needed for libecap v1.0 that uses tr1::shared_ptr. However, libecap is being updated to use std::shared_ptr. Once that update is complete, Squid eCAP code will no longer compile because the implicit conversion of shared_ptr to bool in tr1 was deemed dangerous and, hence, made "explicit" when shared_ptr became standard. Unlike "if" statements, "return" statements do not trigger an explicit conversion. --- diff --git a/src/adaptation/ecap/ServiceRep.cc b/src/adaptation/ecap/ServiceRep.cc index 7577c1b213..f29c10f564 100644 --- a/src/adaptation/ecap/ServiceRep.cc +++ b/src/adaptation/ecap/ServiceRep.cc @@ -236,7 +236,7 @@ bool Adaptation::Ecap::ServiceRep::probed() const bool Adaptation::Ecap::ServiceRep::up() const { - return theService; + return bool(theService); } bool Adaptation::Ecap::ServiceRep::wantsUrl(const SBuf &urlPath) const