From 487ba71c9ea30fe3b77dfc15e86d67f44c7cc79a Mon Sep 17 00:00:00 2001 From: Douglas Mencken Date: Thu, 3 Mar 2016 06:57:58 -0500 Subject: apple_remote: fix “variable set but not used” for non-debug builds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I038fd0bee0e983a91557226aaba1dcff56512ccb Reviewed-on: https://gerrit.libreoffice.org/22856 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- apple_remote/source/RemoteMainController.m | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'apple_remote/source/RemoteMainController.m') diff --git a/apple_remote/source/RemoteMainController.m b/apple_remote/source/RemoteMainController.m index 82dd05512d25..1972c5fc523f 100644 --- a/apple_remote/source/RemoteMainController.m +++ b/apple_remote/source/RemoteMainController.m @@ -102,15 +102,15 @@ - (void) remoteButton: (RemoteControlEventIdentifier)buttonIdentifier pressedDown: (BOOL) pressedDown clickCount: (unsigned int)clickCount { (void)clickCount; - NSString* pressed = @""; #ifdef DEBUG + NSString* pressed = @""; NSString* buttonName = nil; #endif if (pressedDown) { +#ifdef DEBUG pressed = @"(AppleRemoteMainController: button pressed)"; -#ifdef DEBUG switch(buttonIdentifier) { case kRemoteButtonPlus: buttonName = @"Volume up"; break; // MEDIA_COMMAND_VOLUME_UP ( see include/vcl/commandevent.hxx ) @@ -134,14 +134,16 @@ } else // not pressed { +#ifdef DEBUG pressed = @"(AppleRemoteMainController: button released)"; +#endif } #ifdef DEBUG //NSLog(@"Button %@ pressed %@", buttonName, pressed); NSString* clickCountString = @""; if (clickCount > 1) clickCountString = [NSString stringWithFormat: @"%d clicks", clickCount]; - NSString* feedbackString = [NSString stringWithFormat:@"(Value:%4d) %@ %@ %@",buttonIdentifier, buttonName, pressed, clickCountString]; + NSString* feedbackString = [NSString stringWithFormat:@"(Value:%4d) %@ %@ %@", buttonIdentifier, buttonName, pressed, clickCountString]; // print out events NSLog(@"%@", feedbackString); -- cgit v1.2.3