diff options
author | Benjamin Barenblat <benjamin@barenblat.name> | 2018-07-11 13:20:01 -0400 |
---|---|---|
committer | Thomas Van Lenten <thomasvl@google.com> | 2018-07-11 13:20:01 -0400 |
commit | 048f5c26a783f5f92061aec3aab19986e5c8d435 (patch) | |
tree | 74fe45ea33ccb4ae295f5359d875ac345db8d837 | |
parent | 237938ac6ae07d732e1147073ab3569379c313a5 (diff) | |
download | protobuf-048f5c26a783f5f92061aec3aab19986e5c8d435.tar.gz protobuf-048f5c26a783f5f92061aec3aab19986e5c8d435.tar.bz2 protobuf-048f5c26a783f5f92061aec3aab19986e5c8d435.zip |
objectivec: Quash -Wself-assign and -Wvla (#4897)
* objectivec: Quash -Wself-assign
* objectivec: Set -Wno-vla when building
Objective-C protobuf uses VLAs for performance reasons. Ensure Clang
doesn’t complain about them.
-rw-r--r-- | BUILD | 3 | ||||
-rw-r--r-- | objectivec/Tests/GPBTestUtilities.m | 2 |
2 files changed, 4 insertions, 1 deletions
@@ -934,6 +934,9 @@ OBJC_SRCS = [ objc_library( name = "objectivec", hdrs = OBJC_HDRS + OBJC_PRIVATE_HDRS, + copts = [ + "-Wno-vla", + ], includes = [ "objectivec", ], diff --git a/objectivec/Tests/GPBTestUtilities.m b/objectivec/Tests/GPBTestUtilities.m index ebccaac9..0362bdde 100644 --- a/objectivec/Tests/GPBTestUtilities.m +++ b/objectivec/Tests/GPBTestUtilities.m @@ -85,7 +85,7 @@ const uint32_t kGPBDefaultRepeatCount = 2; NSLog(@"Wrote data file to %@", path); #else // Kill off the unused variable warning. - dataToWrite = dataToWrite; + (void)dataToWrite; #endif return data; } |