Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
strangewiz opened this issue Mar 3, 2022 · 0 comments
Open

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

strangewiz opened this issue Mar 3, 2022 · 0 comments

Comments

@strangewiz
Copy link
Contributor

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);
^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant