From ff45ee12650043b36e25c822895911a173543986 Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Sat, 28 Dec 2024 23:15:22 +0100 Subject: [PATCH 1/3] Maintenance: remove HERE --- scripts/maintenance/HERE-obsolete | 17 ----------------- src/debug/Stream.h | 15 --------------- src/tests/stub_cache_manager.cc | 6 +----- 3 files changed, 1 insertion(+), 37 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..cf3b45e6dc3 100644 --- a/src/debug/Stream.h +++ b/src/debug/Stream.h @@ -208,21 +208,6 @@ 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. * 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) {} From e0c62da424207832c6829dfffe0052ca785792e4 Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Sun, 29 Dec 2024 19:08:07 +1300 Subject: [PATCH 2/3] Update src/debug/Stream.h Co-authored-by: Alex Rousskov --- src/debug/Stream.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/debug/Stream.h b/src/debug/Stream.h index cf3b45e6dc3..0b8c43b010a 100644 --- a/src/debug/Stream.h +++ b/src/debug/Stream.h @@ -209,7 +209,7 @@ void ResyncDebugLog(FILE *newDestination); std::ostream& ForceAlert(std::ostream& 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"); */ From 947193d104a2f10fcc87b630806c0a95f48fdbef Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Tue, 31 Dec 2024 14:58:40 +0000 Subject: [PATCH 3/3] Empty commit to trigger github check