From 76bf845ec83e03bd6fef52f6faf54d13ee2286f4 Mon Sep 17 00:00:00 2001 From: Vern Paxson Date: Sat, 27 Sep 2025 15:04:23 -0700 Subject: [PATCH] suppress complaints about unused functions/events/hooks --- src/script_opt/CPP/RuntimeInits.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/script_opt/CPP/RuntimeInits.cc b/src/script_opt/CPP/RuntimeInits.cc index eba85bc9cf..b5edcc83d5 100644 --- a/src/script_opt/CPP/RuntimeInits.cc +++ b/src/script_opt/CPP/RuntimeInits.cc @@ -507,6 +507,9 @@ void CPP_GlobalInit::Generate(InitsManager* im, std::vector& /* inits_vec if ( attrs >= 0 ) global->SetAttrs(im->Attributes(attrs)); + + if ( t->Tag() == TYPE_FUNC ) + global->AddAttr(make_intrusive(ATTR_IS_USED)); } size_t generate_indices_set(int* inits, std::vector>& indices_set) {