Guest User

Untitled

a guest
Jun 23rd, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.58 KB | None | 0 0
  1. Fix two minor warnings found by clang
  2.  
  3. NSString stringWithContentsOfFile without explicit encoding is deprecated
  4. since OS X 10.4
  5.  
  6.  
  7. Index: macosx/AboutWindowController.m
  8. ===================================================================
  9. --- macosx/AboutWindowController.m (revision 8389)
  10. +++ macosx/AboutWindowController.m (working copy)
  11. @@ -71,7 +71,9 @@
  12.  
  13. - (IBAction) showLicense: (id) sender
  14. {
  15. - [fLicenseView setString: [NSString stringWithContentsOfFile: [[NSBundle mainBundle] pathForResource: @"COPYING" ofType: nil]]];
  16. + [fLicenseView setString: [NSString stringWithContentsOfFile:
  17. + [[NSBundle mainBundle] pathForResource: @"COPYING" ofType: nil]
  18. + encoding: NSUTF8StringEncoding error: nil]];
  19. [fLicenseCloseButton setTitle: NSLocalizedString(@"OK", "About window -> license close button")];
  20.  
  21. [NSApp beginSheet: fLicenseSheet modalForWindow: [self window] modalDelegate: nil didEndSelector: nil contextInfo: nil];
  22. Index: macosx/PortChecker.m
  23. ===================================================================
  24. --- macosx/PortChecker.m (revision 8389)
  25. +++ macosx/PortChecker.m (working copy)
  26. @@ -108,7 +108,7 @@
  27. [self callBackWithStatus: PORT_STATUS_CLOSED];
  28. else
  29. {
  30. - NSLog([NSString stringWithFormat: @"Unable to get port status: invalid response (%@)", probeString]);
  31. + NSLog(@"Unable to get port status: invalid response (%@)", probeString);
  32. [self callBackWithStatus: PORT_STATUS_ERROR];
  33. }
  34. [probeString release];
Add Comment
Please, Sign In to add comment