Fix missing parameter lists.

In C (before C23), a missing parameter list means “parameters are unknown”, not
“no parameters” (unlike C++).  See
https://en.cppreference.com/w/c/language/function_declaration.

PiperOrigin-RevId: 499559101
pull/13171/head
Protobuf Team Bot 2 years ago committed by Copybara-Service
parent c64f26e4fa
commit b8f35b2628
  1. 2
      python/descriptor_pool.c
  2. 2
      upb/message/accessors.c

@ -45,7 +45,7 @@ typedef struct {
PyObject* db; // The DescriptorDatabase underlying this pool. May be NULL.
} PyUpb_DescriptorPool;
PyObject* PyUpb_DescriptorPool_GetDefaultPool() {
PyObject* PyUpb_DescriptorPool_GetDefaultPool(void) {
PyUpb_ModuleState* s = PyUpb_ModuleState_Get();
return s->default_pool;
}

@ -147,7 +147,7 @@ upb_GetExtensionAsBytes_Status upb_MiniTable_GetExtensionAsBytes(
return kUpb_GetExtensionAsBytes_Ok;
}
static upb_FindUnknownRet upb_FindUnknownRet_ParseError() {
static upb_FindUnknownRet upb_FindUnknownRet_ParseError(void) {
return (upb_FindUnknownRet){.status = kUpb_FindUnknown_ParseError};
}

Loading…
Cancel
Save