diff options
author | Thomas Van Lenten <thomasvl@google.com> | 2016-05-26 11:10:00 -0400 |
---|---|---|
committer | Thomas Van Lenten <thomasvl@google.com> | 2016-05-26 11:10:00 -0400 |
commit | 0f27cab4fb378b94a91c2b1522174ec21719df9d (patch) | |
tree | 6111cbd70b21027c678647381eba6d3974b51740 /objectivec/GPBDescriptor.m | |
parent | ed87c1fe2c6e1633cadb62cf54b2723b2b25c280 (diff) | |
parent | c8a440dfb68074ff310e624928cd2dd61c101728 (diff) | |
download | protobuf-0f27cab4fb378b94a91c2b1522174ec21719df9d.tar.gz protobuf-0f27cab4fb378b94a91c2b1522174ec21719df9d.tar.bz2 protobuf-0f27cab4fb378b94a91c2b1522174ec21719df9d.zip |
Merge pull request #1600 from thomasvl/objc_tighter_warnings
Add more warnings to for the ObjC runtime build
Diffstat (limited to 'objectivec/GPBDescriptor.m')
-rw-r--r-- | objectivec/GPBDescriptor.m | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/objectivec/GPBDescriptor.m b/objectivec/GPBDescriptor.m index 2709737c..898f231d 100644 --- a/objectivec/GPBDescriptor.m +++ b/objectivec/GPBDescriptor.m @@ -36,6 +36,12 @@ #import "GPBWireFormat.h" #import "GPBMessage_PackagePrivate.h" +// Direct access is use for speed, to avoid even internally declaring things +// read/write, etc. The warning is enabled in the project to ensure code calling +// protos can turn on -Wdirect-ivar-access without issues. +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdirect-ivar-access" + // The address of this variable is used as a key for obj_getAssociatedObject. static const char kTextFormatExtraValueKey = 0; @@ -803,7 +809,7 @@ uint32_t GPBFieldAlternateTag(GPBFieldDescriptor *self) { if ((self = [super init])) { description_ = description; -#if DEBUG +#if defined(DEBUG) && DEBUG const char *className = description->messageOrGroupClassName; if (className) { NSAssert(objc_lookUpClass(className) != Nil, @@ -961,3 +967,5 @@ uint32_t GPBFieldAlternateTag(GPBFieldDescriptor *self) { } @end + +#pragma clang diagnostic pop |