Commit 048f5c26 authored by Benjamin Barenblat's avatar Benjamin Barenblat Committed by Thomas Van Lenten

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.
parent 237938ac
...@@ -934,6 +934,9 @@ OBJC_SRCS = [ ...@@ -934,6 +934,9 @@ OBJC_SRCS = [
objc_library( objc_library(
name = "objectivec", name = "objectivec",
hdrs = OBJC_HDRS + OBJC_PRIVATE_HDRS, hdrs = OBJC_HDRS + OBJC_PRIVATE_HDRS,
copts = [
"-Wno-vla",
],
includes = [ includes = [
"objectivec", "objectivec",
], ],
......
...@@ -85,7 +85,7 @@ const uint32_t kGPBDefaultRepeatCount = 2; ...@@ -85,7 +85,7 @@ const uint32_t kGPBDefaultRepeatCount = 2;
NSLog(@"Wrote data file to %@", path); NSLog(@"Wrote data file to %@", path);
#else #else
// Kill off the unused variable warning. // Kill off the unused variable warning.
dataToWrite = dataToWrite; (void)dataToWrite;
#endif #endif
return data; return data;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment