[Libreoffice-commits] core.git: apple_remote/source

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Thu Jun 10 13:53:30 UTC 2021


 apple_remote/source/HIDRemoteControlDevice.m |   16 +---------------
 1 file changed, 1 insertion(+), 15 deletions(-)

New commits:
commit 893c8fa232b0c78c5f390f7d35b6e1a7f6538ed1
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Thu Jun 10 14:29:52 2021 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Thu Jun 10 15:52:51 2021 +0200

    -Werror,-Wunused-but-set-variable (Clang 13 trunk)
    
    all three variables were unused ever since the code's introduction in
    229a0de9c81554dfe6c96a0095a582476abc87ba "CWS-TOOLING: integrate CWS
    appleremote01"
    
    Change-Id: Ib755b86c81a6823c440f9f6a392b8f4b7de973ad
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116984
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/apple_remote/source/HIDRemoteControlDevice.m b/apple_remote/source/HIDRemoteControlDevice.m
index 9a875d1910c4..6ed20b8eb6bf 100644
--- a/apple_remote/source/HIDRemoteControlDevice.m
+++ b/apple_remote/source/HIDRemoteControlDevice.m
@@ -407,8 +407,6 @@ static void QueueCallbackFunction(void* target,  IOReturn result, void* refcon,
 - (BOOL) initializeCookies {
     IOHIDDeviceInterface122** handle = (IOHIDDeviceInterface122**)hidDeviceInterface;
     IOHIDElementCookie      cookie;
-    long                    usage;
-    long                    usagePage;
     id                      object;
     NSArray*                elements = nil;
     NSDictionary*           element;
@@ -439,16 +437,6 @@ static void QueueCallbackFunction(void* target,  IOReturn result, void* refcon,
             if (object == NULL || CFGetTypeID(object) != CFNumberGetTypeID()) continue;
             cookie = (IOHIDElementCookie) [object longValue];
 
-            //Get usage
-            object = [element valueForKey: (NSString*)CFSTR(kIOHIDElementUsageKey) ];
-            if (object == nil || ![object isKindOfClass:[NSNumber class]]) continue;
-            usage = [object longValue];
-
-            //Get usage page
-            object = [element valueForKey: (NSString*)CFSTR(kIOHIDElementUsagePageKey) ];
-            if (object == nil || ![object isKindOfClass:[NSNumber class]]) continue;
-            usagePage = [object longValue];
-
             [allCookies addObject: [NSNumber numberWithInt:(int)cookie]];
         }
         CFRelease(elements);
@@ -461,8 +449,6 @@ static void QueueCallbackFunction(void* target,  IOReturn result, void* refcon,
 }
 
 - (BOOL) openDevice {
-    HRESULT  result;
-
     IOHIDOptionsType openMode = kIOHIDOptionsTypeNone;
     if ([self isOpenInExclusiveMode]) openMode = kIOHIDOptionsTypeSeizeDevice;
     IOReturn ioReturnValue = (*hidDeviceInterface)->open(hidDeviceInterface, openMode);
@@ -470,7 +456,7 @@ static void QueueCallbackFunction(void* target,  IOReturn result, void* refcon,
     if (ioReturnValue == KERN_SUCCESS) {
         queue = (*hidDeviceInterface)->allocQueue(hidDeviceInterface);
         if (queue) {
-            result = (*queue)->create(queue, 0, 12);    //depth: maximum number of elements in queue before oldest elements in queue begin to be lost.
+            (*queue)->create(queue, 0, 12);    //depth: maximum number of elements in queue before oldest elements in queue begin to be lost.
 
             IOHIDElementCookie cookie;
             NSEnumerator *allCookiesEnumerator = [allCookies objectEnumerator];


More information about the Libreoffice-commits mailing list