Skip to content

Commit 8a61e77

Browse files
authored
Add back fix for g3 warnings (#8645)
1 parent 4ab5dc5 commit 8a61e77

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Functions/Example/Tests/FIRFunctionsTests.m

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,11 @@ - (void)testCallFunctionWhenAppCheckIsInstalledAndFACTokenSuccess {
161161

162162
XCTestExpectation *httpRequestExpectation =
163163
[self expectationWithDescription:@"HTTPRequestExpectation"];
164+
__weak __auto_type weakSelf = self;
164165
_fetcherService.testBlock = ^(GTMSessionFetcher *_Nonnull fetcherToTest,
165166
GTMSessionFetcherTestResponse _Nonnull testResponse) {
167+
// __unused to avoid warning in Xcode 12+ in g3.
168+
__unused __auto_type self = weakSelf;
166169
[httpRequestExpectation fulfill];
167170

168171
NSString *appCheckTokenHeader =
@@ -225,9 +228,11 @@ - (void)testCallFunctionWhenAppCheckIsNotInstalled {
225228

226229
XCTestExpectation *httpRequestExpectation =
227230
[self expectationWithDescription:@"HTTPRequestExpectation"];
228-
231+
__weak __auto_type weakSelf = self;
229232
_fetcherService.testBlock = ^(GTMSessionFetcher *_Nonnull fetcherToTest,
230233
GTMSessionFetcherTestResponse _Nonnull testResponse) {
234+
// __unused to avoid warning in Xcode 12+ in g3.
235+
__unused __auto_type self = weakSelf;
231236
[httpRequestExpectation fulfill];
232237

233238
NSString *appCheckTokenHeader =

0 commit comments

Comments
 (0)