Permalink
Browse files

Shut up two deprecation warnings (may raise system requirements).

  • Loading branch information...
1 parent 75aa3d2 commit 20f6e31fc36440879f5b35c547d8848c38bcf580 @uliwitness committed Mar 8, 2010
Showing with 2 additions and 2 deletions.
  1. +1 −1 UKCrashReporter.m
  2. +1 −1 UKSystemInfo.m
View
@@ -91,7 +91,7 @@ void UKCrashReporterCheckForCrash()
if( [lastTimeCrashReported compare: lastTimeCrashLogged] == NSOrderedAscending )
{
// Fetch the newest report from the log:
- NSString* crashLog = [NSString stringWithContentsOfFile: crashLogPath];
+ NSString* crashLog = [NSString stringWithContentsOfFile: crashLogPath encoding: NSUTF8StringEncoding error: nil]; // +++ Check error.
NSArray* separateReports = [crashLog componentsSeparatedByString: @"\n\n**********\n\n"];
NSString* currentReport = [separateReports count] > 0 ? [separateReports objectAtIndex: [separateReports count] -1] : @"*** Couldn't read Report ***"; // 1 since report 0 is empty (file has a delimiter at the top).
unsigned numCores = UKCountCores();
View
@@ -112,7 +112,7 @@ unsigned UKCountCores()
if( Gestalt( gestaltUserVisibleMachineName, (long*) &machineName ) == noErr )
{
- NSString* internalName = [NSString stringWithCString: machineName +1 length: machineName[0]];
+ NSString* internalName = [[[NSString alloc] initWithBytes: machineName +1 length: machineName[0] encoding: NSMacOSRomanStringEncoding] autorelease];
static NSDictionary* translationDictionary = nil;
if( !translationDictionary )

0 comments on commit 20f6e31

Please sign in to comment.