-Werror,-Wunused-but-set-variable (Clang 13 trunk)

all three variables were unused ever since the code's introduction in
229a0de9c8 "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@redhat.com>
This commit is contained in:
Stephan Bergmann
2021-06-10 14:29:52 +02:00
parent 3732bba5e2
commit 893c8fa232

View File

@@ -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];