Merge pull request #10165 from oontvoo/patch-1

Add __unused to variable to silence unused-variable warning
pull/10293/head
Matt Fowles Kulukundis 3 years ago committed by GitHub
commit b3f2270de1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      objectivec/GPBUtilities.m

@ -2248,7 +2248,7 @@ void GPBMaybeClearOneof(GPBMessage *self, GPBOneofDescriptor *oneof,
NSCAssert([[self descriptor] oneofWithName:oneof.name] == oneof,
@"OneofDescriptor %@ doesn't appear to be for %@ messages.",
oneof.name, [self class]);
GPBFieldDescriptor *firstField = oneof->fields_[0];
GPBFieldDescriptor *firstField __unused = oneof->fields_[0];
NSCAssert(firstField->description_->hasIndex == oneofHasIndex,
@"Internal error, oneofHasIndex (%d) doesn't match (%d).",
firstField->description_->hasIndex, oneofHasIndex);

Loading…
Cancel
Save