From d0dfcde6c5b60660582bf800ab4e4c9d09d79009 Mon Sep 17 00:00:00 2001 From: Marjolein Heyndrickx Date: Thu, 11 Aug 2022 13:23:55 +0200 Subject: [PATCH 1/2] avoid unused-paramter warning for c++ --- src/google/protobuf/arena.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/google/protobuf/arena.h b/src/google/protobuf/arena.h index 59e02e0963..1ee2ef8d75 100644 --- a/src/google/protobuf/arena.h +++ b/src/google/protobuf/arena.h @@ -437,7 +437,7 @@ class PROTOBUF_EXPORT PROTOBUF_ALIGNAS(8) Arena final { } template - static Arena* GetOwningArena(Rank1, const U* p) { + static Arena* GetOwningArena(Rank1, const U*) { return nullptr; } @@ -467,7 +467,7 @@ class PROTOBUF_EXPORT PROTOBUF_ALIGNAS(8) Arena final { } template - static Arena* GetArenaForAllocation(Rank2, const U* p) { + static Arena* GetArenaForAllocation(Rank2, const U*) { return nullptr; } From da05f11cfe9308ba52f419a1346127037c6bd4c1 Mon Sep 17 00:00:00 2001 From: Marjolein Heyndrickx Date: Tue, 16 Aug 2022 09:44:18 +0200 Subject: [PATCH 2/2] avoid unused parameter warning --- src/google/protobuf/arena.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/google/protobuf/arena.h b/src/google/protobuf/arena.h index 1ee2ef8d75..06e196fbb7 100644 --- a/src/google/protobuf/arena.h +++ b/src/google/protobuf/arena.h @@ -437,7 +437,8 @@ class PROTOBUF_EXPORT PROTOBUF_ALIGNAS(8) Arena final { } template - static Arena* GetOwningArena(Rank1, const U*) { + static Arena* GetOwningArena(Rank1, const U* p) { + (void) p; return nullptr; } @@ -467,7 +468,8 @@ class PROTOBUF_EXPORT PROTOBUF_ALIGNAS(8) Arena final { } template - static Arena* GetArenaForAllocation(Rank2, const U*) { + static Arena* GetArenaForAllocation(Rank2, const U* p) { + (void) p; return nullptr; }