]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix GCC v5.5.0 build after 82fe21f (#962)
authorEduard Bagdasaryan <eduard.bagdasaryan@measurement-factory.com>
Thu, 13 Jan 2022 18:00:56 +0000 (18:00 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Thu, 13 Jan 2022 19:55:05 +0000 (19:55 +0000)
Old problems revealed by recent commits:

    XactionRep.cc:174:20: error: declaration of 'String name' shadows
    a parameter [-Werror=shadow]

    XactionRep.cc:486:33: error: declaration of 'services' shadows
    a previous local [-Werror=shadow]

src/adaptation/ecap/XactionRep.cc

index 249359b23ba789d2a3ae6bc949e6aee30939fedd..ea0795a7371ec6912acd41e4105aa9ae722bb944 100644 (file)
@@ -163,12 +163,12 @@ Adaptation::Ecap::XactionRep::usernameValue() const
 }
 
 const libecap::Area
-Adaptation::Ecap::XactionRep::masterxSharedValue(const libecap::Name &name) const
+Adaptation::Ecap::XactionRep::masterxSharedValue(const libecap::Name &sharedName) const
 {
     const HttpRequest *request = dynamic_cast<const HttpRequest*>(theCauseRep ?
                                  theCauseRep->raw().header : theVirginRep.raw().header);
     Must(request);
-    if (name.known()) { // must check to avoid empty names matching unset cfg
+    if (sharedName.known()) { // must check to avoid empty names matching unset cfg
         Adaptation::History::Pointer ah = request->adaptHistory(false);
         if (ah != NULL) {
             String name, value;
@@ -482,7 +482,6 @@ Adaptation::Ecap::XactionRep::updateHistory(Http::Message *adapted)
 
     // update the adaptation plan if needed
     if (service().cfg().routing) {
-        String services;
         if (const libecap::Area services = theMaster->option(libecap::metaNextServices)) {
             Adaptation::History::Pointer ah = request->adaptHistory(true);
             if (ah != NULL)