From 8c88957ef375f3b739b6e72ea5c2fb71b12e1fc2 Mon Sep 17 00:00:00 2001 From: Thomas Van Lenten Date: Tue, 16 Jun 2015 16:45:14 -0400 Subject: Add nonnil markup to ObjC library. Add the clang annotations to the objc library and generated code to help with Swift bridging and compiler checks. --- objectivec/GPBUtilities.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'objectivec/GPBUtilities.m') diff --git a/objectivec/GPBUtilities.m b/objectivec/GPBUtilities.m index 7a035ce6..5ee61230 100644 --- a/objectivec/GPBUtilities.m +++ b/objectivec/GPBUtilities.m @@ -1497,7 +1497,7 @@ static void AppendTextFormatForMessage(GPBMessage *message, } NSString *GPBTextFormatForMessage(GPBMessage *message, NSString *lineIndent) { - if (message == nil) return nil; + if (message == nil) return @""; if (lineIndent == nil) lineIndent = @""; NSMutableString *buildString = [NSMutableString string]; @@ -1507,7 +1507,7 @@ NSString *GPBTextFormatForMessage(GPBMessage *message, NSString *lineIndent) { NSString *GPBTextFormatForUnknownFieldSet(GPBUnknownFieldSet *unknownSet, NSString *lineIndent) { - if (unknownSet == nil) return nil; + if (unknownSet == nil) return @""; if (lineIndent == nil) lineIndent = @""; NSMutableString *result = [NSMutableString string]; -- cgit v1.2.3