Kaydet (Commit) 487ba71c authored tarafından Douglas Mencken's avatar Douglas Mencken Kaydeden (comit) Stephan Bergmann

apple_remote: fix “variable set but not used” for non-debug builds

Change-Id: I038fd0bee0e983a91557226aaba1dcff56512ccb
Reviewed-on: https://gerrit.libreoffice.org/22856Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst 88415121
...@@ -102,15 +102,15 @@ ...@@ -102,15 +102,15 @@
- (void) remoteButton: (RemoteControlEventIdentifier)buttonIdentifier pressedDown: (BOOL) pressedDown clickCount: (unsigned int)clickCount - (void) remoteButton: (RemoteControlEventIdentifier)buttonIdentifier pressedDown: (BOOL) pressedDown clickCount: (unsigned int)clickCount
{ {
(void)clickCount; (void)clickCount;
NSString* pressed = @"";
#ifdef DEBUG #ifdef DEBUG
NSString* pressed = @"";
NSString* buttonName = nil; NSString* buttonName = nil;
#endif #endif
if (pressedDown) if (pressedDown)
{ {
#ifdef DEBUG
pressed = @"(AppleRemoteMainController: button pressed)"; pressed = @"(AppleRemoteMainController: button pressed)";
#ifdef DEBUG
switch(buttonIdentifier) switch(buttonIdentifier)
{ {
case kRemoteButtonPlus: buttonName = @"Volume up"; break; // MEDIA_COMMAND_VOLUME_UP ( see include/vcl/commandevent.hxx ) case kRemoteButtonPlus: buttonName = @"Volume up"; break; // MEDIA_COMMAND_VOLUME_UP ( see include/vcl/commandevent.hxx )
...@@ -134,14 +134,16 @@ ...@@ -134,14 +134,16 @@
} }
else // not pressed else // not pressed
{ {
#ifdef DEBUG
pressed = @"(AppleRemoteMainController: button released)"; pressed = @"(AppleRemoteMainController: button released)";
#endif
} }
#ifdef DEBUG #ifdef DEBUG
//NSLog(@"Button %@ pressed %@", buttonName, pressed); //NSLog(@"Button %@ pressed %@", buttonName, pressed);
NSString* clickCountString = @""; NSString* clickCountString = @"";
if (clickCount > 1) clickCountString = [NSString stringWithFormat: @"%d clicks", clickCount]; 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 // print out events
NSLog(@"%@", feedbackString); NSLog(@"%@", feedbackString);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment