Skip to content

Commit

Permalink
Miscellaneous compiler warning fixes:
Browse files Browse the repository at this point in the history
 - Unused arguments.
 - Missing `override` in declarations.
 - Wstrict-prototypes in objective C.

PiperOrigin-RevId: 499496063
  • Loading branch information
protobuf-github-bot authored and copybara-github committed Jan 4, 2023
1 parent f75fd05 commit c9c0a1c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions objectivec/GPBUtilities_PackagePrivate.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ CF_EXTERN_C_BEGIN
// 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.
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
// headers at the time the generated code was compiled.
#if defined(DEBUG) && DEBUG
Expand All @@ -69,7 +69,7 @@ GPB_INLINE void GPB_DEBUG_CHECK_RUNTIME_VERSIONS() {
// Legacy version of the checks, remove when GOOGLE_PROTOBUF_OBJC_GEN_VERSION
// goes away (see more info in GPBBootstrap.h).
void GPBCheckRuntimeVersionInternal(int32_t version);
GPB_INLINE void GPBDebugCheckRuntimeVersion() {
GPB_INLINE void GPBDebugCheckRuntimeVersion(void) {
#if defined(DEBUG) && DEBUG
GPBCheckRuntimeVersionInternal(GOOGLE_PROTOBUF_OBJC_GEN_VERSION);
#endif
Expand Down
4 changes: 2 additions & 2 deletions src/google/protobuf/arena.h
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ class PROTOBUF_EXPORT PROTOBUF_ALIGNAS(8) Arena final {
}

template <typename U>
static Arena* GetOwningArena(Rank1, const U* p) {
static Arena* GetOwningArena(Rank1, const U*) {
return nullptr;
}

Expand Down Expand Up @@ -456,7 +456,7 @@ class PROTOBUF_EXPORT PROTOBUF_ALIGNAS(8) Arena final {
}

template <typename U>
static Arena* GetArenaForAllocation(Rank2, const U* p) {
static Arena* GetArenaForAllocation(Rank2, const U*) {
return nullptr;
}

Expand Down

0 comments on commit c9c0a1c

Please sign in to comment.