Miscellaneous compiler warning fixes:

- Unused arguments.
 - Missing `override` in declarations.
 - Wstrict-prototypes in objective C.

PiperOrigin-RevId: 499496063
pull/11448/head
Protobuf Team Bot 2 years ago committed by Copybara-Service
parent f75fd051d6
commit c9c0a1c843
  1. 4
      objectivec/GPBUtilities_PackagePrivate.h
  2. 4
      src/google/protobuf/arena.h

@ -58,7 +58,7 @@ CF_EXTERN_C_BEGIN
// These two are used to inject a runtime check for version mismatch into the // These two are used to inject a runtime check for version mismatch into the
// generated sources to make sure they are linked with a supporting runtime. // generated sources to make sure they are linked with a supporting runtime.
void GPBCheckRuntimeVersionSupport(int32_t objcRuntimeVersion); void GPBCheckRuntimeVersionSupport(int32_t objcRuntimeVersion);
GPB_INLINE void GPB_DEBUG_CHECK_RUNTIME_VERSIONS() { GPB_INLINE void GPB_DEBUG_CHECK_RUNTIME_VERSIONS(void) {
// NOTE: By being inline here, this captures the value from the library's // NOTE: By being inline here, this captures the value from the library's
// headers at the time the generated code was compiled. // headers at the time the generated code was compiled.
#if defined(DEBUG) && DEBUG #if defined(DEBUG) && DEBUG
@ -69,7 +69,7 @@ GPB_INLINE void GPB_DEBUG_CHECK_RUNTIME_VERSIONS() {
// Legacy version of the checks, remove when GOOGLE_PROTOBUF_OBJC_GEN_VERSION // Legacy version of the checks, remove when GOOGLE_PROTOBUF_OBJC_GEN_VERSION
// goes away (see more info in GPBBootstrap.h). // goes away (see more info in GPBBootstrap.h).
void GPBCheckRuntimeVersionInternal(int32_t version); void GPBCheckRuntimeVersionInternal(int32_t version);
GPB_INLINE void GPBDebugCheckRuntimeVersion() { GPB_INLINE void GPBDebugCheckRuntimeVersion(void) {
#if defined(DEBUG) && DEBUG #if defined(DEBUG) && DEBUG
GPBCheckRuntimeVersionInternal(GOOGLE_PROTOBUF_OBJC_GEN_VERSION); GPBCheckRuntimeVersionInternal(GOOGLE_PROTOBUF_OBJC_GEN_VERSION);
#endif #endif

@ -426,7 +426,7 @@ class PROTOBUF_EXPORT PROTOBUF_ALIGNAS(8) Arena final {
} }
template <typename U> template <typename U>
static Arena* GetOwningArena(Rank1, const U* p) { static Arena* GetOwningArena(Rank1, const U*) {
return nullptr; return nullptr;
} }
@ -456,7 +456,7 @@ class PROTOBUF_EXPORT PROTOBUF_ALIGNAS(8) Arena final {
} }
template <typename U> template <typename U>
static Arena* GetArenaForAllocation(Rank2, const U* p) { static Arena* GetArenaForAllocation(Rank2, const U*) {
return nullptr; return nullptr;
} }

Loading…
Cancel
Save