diff --git a/base/internal/data.h b/base/internal/data.h index f0470bd1c..957b72edb 100644 --- a/base/internal/data.h +++ b/base/internal/data.h @@ -97,6 +97,9 @@ enum class DataLocality { // at least `sizeof(void*)`. class Data {}; +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wattributes" + // Empty base class indicating class must be stored directly in the handle and // not allocated separately on the heap. // @@ -162,6 +165,8 @@ class HeapData /* : public Data */ { 0; }; +#pragma GCC diagnostic pop + // Provides introspection for `Data`. class Metadata final { public: diff --git a/base/memory_manager.cc b/base/memory_manager.cc index 9c2bd2341..1b7b3550a 100644 --- a/base/memory_manager.cc +++ b/base/memory_manager.cc @@ -117,13 +117,13 @@ std::optional ArenaBlockAllocate(size_t size, pointer = VirtualAlloc(hint, size, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); if (ABSL_PREDICT_FALSE(pointer == nullptr)) { if (hint == nullptr) { - return absl::nullopt; + return std::nullopt; } // Try again, without the hint. pointer = VirtualAlloc(nullptr, size, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); if (pointer == nullptr) { - return absl::nullopt; + return std::nullopt; } } #endif