Skip to content
Browse files

Shut up some warnings.

  • Loading branch information...
1 parent cd5d373 commit dde81ed01d10d4dc82ff30f3d2290e54a68f12e3 @uliwitness committed Sep 28, 2012
Showing with 9 additions and 9 deletions.
  1. +5 −5 NSWindow+Fade.m
  2. +2 −2 UKCrashReporter.m
  3. +2 −2 UKSystemInfo.m
View
10 NSWindow+Fade.m
@@ -38,7 +38,7 @@ -(void) fadeInWithDuration: (NSTimeInterval)duration
if( !pendingFades )
pendingFades = [[NSMutableDictionary alloc] init];
- NSString* key = [NSString stringWithFormat: @"%lx", self];
+ NSString* key = [NSString stringWithFormat: @"%p", self];
NSDictionary* fade = [pendingFades objectForKey: key];
if( fade ) // Currently fading that window? Abort that fade:
@@ -62,7 +62,7 @@ -(void) fadeInWithDuration: (NSTimeInterval)duration
-(void) fadeInOneStep: (NSTimer*)timer
{
- NSString* key = [NSString stringWithFormat: @"%lx", self];
+ NSString* key = [NSString stringWithFormat: @"%p", self];
float newAlpha = [self alphaValue] + [[[pendingFades objectForKey: key] objectForKey: @"stepSize"] floatValue];
if( newAlpha >= 1.0 )
@@ -82,7 +82,7 @@ -(void) fadeOutWithDuration: (NSTimeInterval)duration
if( !pendingFades )
pendingFades = [[NSMutableDictionary alloc] init];
- NSString* key = [NSString stringWithFormat: @"%lx", self];
+ NSString* key = [NSString stringWithFormat: @"%p", self];
NSDictionary* fade = [pendingFades objectForKey: key];
if( fade ) // Currently fading that window? Abort that fade:
@@ -104,7 +104,7 @@ -(void) fadeOutWithDuration: (NSTimeInterval)duration
-(void) fadeOutOneStep: (NSTimer*)timer
{
- NSString* key = [NSString stringWithFormat: @"%lx", self];
+ NSString* key = [NSString stringWithFormat: @"%p", self];
NSMutableDictionary* currFadeDict = [[[pendingFades objectForKey: key] retain] autorelease]; // Make sure it doesn't go away in case we're cross-fading layers.
float newAlpha = [self alphaValue] - [[currFadeDict objectForKey: @"stepSize"] floatValue];
@@ -147,7 +147,7 @@ -(void) fadeToLevel: (int)lev withDuration: (NSTimeInterval)duration
if( !pendingFades )
pendingFades = [[NSMutableDictionary alloc] init];
- NSString* key = [NSString stringWithFormat: @"%lx", self];
+ NSString* key = [NSString stringWithFormat: @"%p", self];
NSDictionary* fade = [pendingFades objectForKey: key];
if( fade ) // Currently fading that window? Abort that fade:
View
4 UKCrashReporter.m
@@ -218,7 +218,7 @@ -(void) awakeFromNib
if( defaultKey )
{
unsigned int defaultIndex = [emailAddresses indexForIdentifier: defaultKey];
- if( defaultIndex >= 0 )
+ if( defaultIndex != NSNotFound )
emailAddr = [emailAddresses valueAtIndex: defaultIndex];
}
}
@@ -281,7 +281,7 @@ -(IBAction) sendCrashReport: (id)sender
[postRequest setHTTPMethod: @"POST"];
[postRequest setValue: contentType forHTTPHeaderField: @"Content-Type"];
[postRequest setValue: agent forHTTPHeaderField: @"User-Agent"];
- NSString *contentLength = [NSString stringWithFormat:@"%lu", [formData length]];
+ NSString *contentLength = [NSString stringWithFormat:@"%u", [formData length]];
[postRequest setValue: contentLength forHTTPHeaderField: @"Content-Length"];
[postRequest setHTTPBody: formData];
View
4 UKSystemInfo.m
@@ -271,9 +271,9 @@ unsigned UKCountCores()
memmove( cpuCStr, &cpu, 4 );
if( (cpu & 0xff000000) >= 0x20000000 && (cpu & 0x00ff0000) >= 0x00200000
&& (cpu & 0x0000ff00) >= 0x00002000 && (cpu & 0x000000ff) >= 0x00000020) // All valid as characters?
- cpuName = [NSString stringWithFormat: @"Unknown (%d/%s)", cpu, &cpu];
+ cpuName = [NSString stringWithFormat: @"Unknown (%ld/%s)", cpu, cpuCStr];
else
- cpuName = [NSString stringWithFormat: @"Unknown (%d)", cpu, &cpu];
+ cpuName = [NSString stringWithFormat: @"Unknown (%ld)", cpu];
}
[cpuName retain]; // Yeah, I know, I'm paranoid.
}

0 comments on commit dde81ed

Please sign in to comment.
Something went wrong with that request. Please try again.