diff --git a/objectivec/GPBAny.pbobjc.m b/objectivec/GPBAny.pbobjc.m index 65207e8293..2e3b86c2b1 100644 --- a/objectivec/GPBAny.pbobjc.m +++ b/objectivec/GPBAny.pbobjc.m @@ -43,7 +43,7 @@ static GPBFileDescription GPBAnyRoot_FileDescription = { // This is to help make sure that the GPBWellKnownTypes.* categories get linked and // developers do not have to use the `-ObjC` linker flag. More information // here: https://medium.com/ios-os-x-development/categories-in-static-libraries-78e41f8ddb96 -__attribute__((used)) static NSString* any_importCategories () { +__attribute__((used)) static NSString* any_importCategories(void) { return GPBWellKnownTypesErrorDomain; } diff --git a/objectivec/GPBDuration.pbobjc.m b/objectivec/GPBDuration.pbobjc.m index 124342f5e5..5919d5ef98 100644 --- a/objectivec/GPBDuration.pbobjc.m +++ b/objectivec/GPBDuration.pbobjc.m @@ -43,7 +43,7 @@ static GPBFileDescription GPBDurationRoot_FileDescription = { // This is to help make sure that the GPBWellKnownTypes.* categories get linked and // developers do not have to use the `-ObjC` linker flag. More information // here: https://medium.com/ios-os-x-development/categories-in-static-libraries-78e41f8ddb96 -__attribute__((used)) static NSString* duration_importCategories () { +__attribute__((used)) static NSString* duration_importCategories(void) { return GPBWellKnownTypesErrorDomain; } diff --git a/objectivec/GPBTimestamp.pbobjc.m b/objectivec/GPBTimestamp.pbobjc.m index faf201519b..3cad69933e 100644 --- a/objectivec/GPBTimestamp.pbobjc.m +++ b/objectivec/GPBTimestamp.pbobjc.m @@ -43,7 +43,7 @@ static GPBFileDescription GPBTimestampRoot_FileDescription = { // This is to help make sure that the GPBWellKnownTypes.* categories get linked and // developers do not have to use the `-ObjC` linker flag. More information // here: https://medium.com/ios-os-x-development/categories-in-static-libraries-78e41f8ddb96 -__attribute__((used)) static NSString* timestamp_importCategories () { +__attribute__((used)) static NSString* timestamp_importCategories(void) { return GPBWellKnownTypesErrorDomain; } diff --git a/src/google/protobuf/compiler/objectivec/file.cc b/src/google/protobuf/compiler/objectivec/file.cc index 9066f63dcf..db95c4eefc 100644 --- a/src/google/protobuf/compiler/objectivec/file.cc +++ b/src/google/protobuf/compiler/objectivec/file.cc @@ -155,7 +155,7 @@ void EmitLinkWKTs(absl::string_view name, io::Printer* p) { // This is to help make sure that the GPBWellKnownTypes.* categories get linked and // developers do not have to use the `-ObjC` linker flag. More information // here: https://medium.com/ios-os-x-development/categories-in-static-libraries-78e41f8ddb96 - __attribute__((used)) static NSString* $basename$_importCategories () { + __attribute__((used)) static NSString* $basename$_importCategories(void) { return GPBWellKnownTypesErrorDomain; } )objc");