modules/pubsub: Ignore lock annotations for subscriber_count()

Change-Id: I4fa76674257fa58e164de54a650d22d5ca017271
Reviewed-on: https://pigweed-internal-review.git.corp.google.com/c/pigweed/showcase/rp2/+/71495
Presubmit-Verified: CQ Bot Account <pigweed-internal-scoped@luci-project-accounts.iam.gserviceaccount.com>
Pigweed-Auto-Submit: Wyatt Hepler <hepler@google.com>
Reviewed-by: Alexei Frolov <frolv@google.com>
Commit-Queue: Wyatt Hepler <hepler@google.com>
diff --git a/modules/pubsub/pubsub.h b/modules/pubsub/pubsub.h
index 5b031a5..0d2871c 100644
--- a/modules/pubsub/pubsub.h
+++ b/modules/pubsub/pubsub.h
@@ -126,14 +126,16 @@
   constexpr size_t max_subscribers() const PW_NO_LOCK_SAFETY_ANALYSIS {
     return subscribers_.size();
   }
-  constexpr size_t subscriber_count() const { return subscriber_count_; }
+  constexpr size_t subscriber_count() const PW_NO_LOCK_SAFETY_ANALYSIS {
+    return subscriber_count_;
+  }
 
  private:
   template <typename T>
   struct IsVariant : std::false_type {};
 
   template <typename... Types>
-  struct IsVariant<std::variant<Types...>> : std::true_type {};
+  struct IsVariant<std::variant<Types...>> : std::true_type{};
 
   // Events (or their variant elements) must be standard layout and trivially
   // copyable & destructible.