google / google/eDistantObject

A few unused-but-set-variable errors in EDO

Open
#241 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Objective-C
Stars
176
Forks
36
PR merge metrics
No merged PRs in 30d

Description

diff --git a/Channel/Sources/EDOChannelUtil.m b/Channel/Sources/EDOChannelUtil.m
index 9894719..433a1c3 100644
--- a/Channel/Sources/EDOChannelUtil.m
+++ b/Channel/Sources/EDOChannelUtil.m
@@ -53,7 +53,7 @@ size_t EDOGetPayloadSizeFromFrameData(dispatch_data_t data) {

EDOSocketFrameHeader_t *frame = NULL;
dispatch_data_t contiguousData = dispatch_data_create_map(data, (const void **)&frame, NULL);
-
+ (void)contiguousData;
if (!edo_isFrameHeaderValid(frame)) {
return 0;
}
diff --git a/Service/Sources/EDOHostService.m b/Service/Sources/EDOHostService.m
index 5f68abf..cc67f77 100644
--- a/Service/Sources/EDOHostService.m
+++ b/Service/Sources/EDOHostService.m
@@ -336,6 +336,7 @@ static const char kEDOExecutingQueueKey = '\0';
- (BOOL)removeObjectWithAddress:(EDOPointerType)remoteAddress {
NSNumber *edoKey = [NSNumber numberWithLongLong:remoteAddress];
__block NSObject *object NS_VALID_UNTIL_END_OF_SCOPE;
+ (void)object;
dispatch_sync(_localObjectsSyncQueue, ^{
// Transfer the ownership of local object to the outer queue, where the object should be
// released.

To silence:
edo/Service/Sources/EDOHostService.m:338:21: error: variable 'object' set but not used [-Werror,-Wunused-but-set-variable]
__block NSObject *object NS_VALID_UNTIL_END_OF_SCOPE;
^
and

edo/Channel/Sources/EDOChannelUtil.m:55:19: error: variable 'contiguousData' set but not used [-Werror,-Wunused-but-set-variable]
dispatch_data_t contiguousData = dispatch_data_create_map(data, (const void **)&frame, NULL);
^

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.