From 6f0bb2747d0a910de4a958eeeab2b9d615156382 Mon Sep 17 00:00:00 2001 From: Evan Brown Date: Wed, 6 Mar 2024 12:32:04 -0800 Subject: Add ABSL_ATTRIBUTE_UNUSED to variables used in an ABSL_ASSUME. PiperOrigin-RevId: 613305668 Change-Id: Ifc247f48ea476745eaaf0dd41dbdab8404a6cafb --- absl/container/internal/raw_hash_set.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'absl/container/internal/raw_hash_set.h') diff --git a/absl/container/internal/raw_hash_set.h b/absl/container/internal/raw_hash_set.h index 0d5a5344..d4418339 100644 --- a/absl/container/internal/raw_hash_set.h +++ b/absl/container/internal/raw_hash_set.h @@ -2672,8 +2672,8 @@ class raw_hash_set { const size_t cap = common().capacity(); // Use local variables because compiler complains about using functions in // assume. - static constexpr bool kSooEnabled = SooEnabled(); - static constexpr size_t kSooCapacity = SooCapacity(); + ABSL_ATTRIBUTE_UNUSED static constexpr bool kSooEnabled = SooEnabled(); + ABSL_ATTRIBUTE_UNUSED static constexpr size_t kSooCapacity = SooCapacity(); ABSL_ASSUME(!kSooEnabled || cap >= kSooCapacity); return cap; } -- cgit v1.2.3