Commit 1f62202f authored by Felix Paul Kühne's avatar Felix Paul Kühne

* some minor fixes (signed vs unsigned ints, removed an always ignored pragma, fixed an if)

parent 25b064e1
......@@ -13,10 +13,8 @@ const int REMOTE_SWITCH_COOKIE=19;
@implementation AppleRemote
#pragma public interface
- (id) init {
if ( self = [super init] ) {
if ( self == [super init] ) {
openInExclusiveMode = YES;
queue = NULL;
hidDeviceInterface = NULL;
......@@ -154,7 +152,7 @@ static AppleRemote* sharedInstance=nil;
+ (AppleRemote*) sharedRemote {
@synchronized(self) {
if (sharedInstance == nil) {
if( sharedInstance == nil ) {
sharedInstance = [[self alloc] init];
}
}
......@@ -331,7 +329,7 @@ static void QueueCallbackFunction(void* target, IOReturn result, void* refcon,
memset(cookies, 0, sizeof(IOHIDElementCookie) * NUMBER_OF_APPLE_REMOTE_ACTIONS);
*/
allCookies = [[NSMutableArray alloc] init];
int i;
unsigned int i;
for (i=0; i< [elements count]; i++) {
element = [elements objectAtIndex:i];
......@@ -372,7 +370,7 @@ static void QueueCallbackFunction(void* target, IOReturn result, void* refcon,
if (queue) {
result = (*queue)->create(queue, 0, 12); //depth: maximum number of elements in queue before oldest elements in queue begin to be lost.
int i=0;
unsigned int i=0;
for(i=0; i<[allCookies count]; i++) {
IOHIDElementCookie cookie = (IOHIDElementCookie)[[allCookies objectAtIndex:i] intValue];
(*queue)->addElement(queue, cookie, 0);
......
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