From e66b20c56dfd72e45df5fb2b638994dd9f668d30 Mon Sep 17 00:00:00 2001 From: Francesco Chemolli <5175948+kinkie@users.noreply.github.com> Date: Tue, 31 Dec 2024 14:58:49 +0000 Subject: [PATCH] Maintenance: remove HERE (#1972) HERE has been deprecated for a while; there is only one remaining instance of it. --- scripts/maintenance/HERE-obsolete | 17 ----------------- src/debug/Stream.h | 17 +---------------- src/tests/stub_cache_manager.cc | 6 +----- 3 files changed, 2 insertions(+), 38 deletions(-) delete mode 100755 scripts/maintenance/HERE-obsolete diff --git a/scripts/maintenance/HERE-obsolete b/scripts/maintenance/HERE-obsolete deleted file mode 100755 index 213c2cb86cd..00000000000 --- a/scripts/maintenance/HERE-obsolete +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/awk -f -# -## Copyright (C) 1996-2023 The Squid Software Foundation and contributors -## -## Squid software is distributed under GPLv2+ license and includes -## contributions from numerous individuals and organizations. -## Please see the COPYING and CONTRIBUTORS files for details. -## - -/HERE/ { - # HERE is obsolete - gsub(/,[ ]?HERE\)/, ", MYNAME)"); - gsub(/,[ ]?[ ]?HERE[ ]?[ ]?<<[ ]?["]:[ ]/, ", \""); - gsub(/,[ ]?[ ]?HERE[ ]?[ ]?<<[ ]?/, ", "); - gsub(/[ ][ ][ ][ ]HERE[ ]?[ ]?<<[ ]?/, " "); -} -{ print } diff --git a/src/debug/Stream.h b/src/debug/Stream.h index 156a8c05f20..0b8c43b010a 100644 --- a/src/debug/Stream.h +++ b/src/debug/Stream.h @@ -208,23 +208,8 @@ void ResyncDebugLog(FILE *newDestination); /// Outside of debugs() context, has no effect and should not be used. std::ostream& ForceAlert(std::ostream& s); -/** stream manipulator which does nothing. - * \deprecated Do not add to new code, and remove when editing old code - * - * Its purpose is to inactivate calls made following previous debugs() - * guidelines such as - * debugs(1,2, "some message"); - * - * His former objective is now absorbed in the debugs call itself - */ -inline std::ostream& -HERE(std::ostream& s) -{ - return s; -} - /* - * MYNAME is for use at debug levels 0 and 1 where HERE is too messy. + * MYNAME is for use (in rare/special cases) at debug levels 0 and 1 * * debugs(1,1, MYNAME << "WARNING: some message"); */ diff --git a/src/tests/stub_cache_manager.cc b/src/tests/stub_cache_manager.cc index 04dbf7f35b3..8f328806d72 100644 --- a/src/tests/stub_cache_manager.cc +++ b/src/tests/stub_cache_manager.cc @@ -15,11 +15,7 @@ #include "tests/STUB.h" Mgr::Action::Pointer CacheManager::createNamedAction(char const*) STUB_RETVAL(nullptr) -void CacheManager::start(const Comm::ConnectionPointer &, HttpRequest *, StoreEntry *, const AccessLogEntryPointer &) -{ - std::cerr << HERE << "\n"; - STUB -} +void CacheManager::start(const Comm::ConnectionPointer &, HttpRequest *, StoreEntry *, const AccessLogEntryPointer &) STUB static CacheManager* instance = nullptr; CacheManager* CacheManager::GetInstance() STUB_RETVAL(instance) void Mgr::RegisterAction(char const *, char const *, OBJH *, Protected, Atomic, Format) {}