]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 4376: clang cannot build Squid eCAP code
authorPatrick Welche <prlw1@cam.ac.uk>
Wed, 29 Jun 2016 17:24:24 +0000 (11:24 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Wed, 29 Jun 2016 17:24:24 +0000 (11:24 -0600)
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.

src/adaptation/ecap/ServiceRep.cc

index 7577c1b213c79f9c59c64273dc7b84f98a1a4530..f29c10f564c27e835c18a6aa5c41d18af4b0b847 100644 (file)
@@ -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