WaE: NSLog format errors when compiling as 64-bit code
Use long format modifiers and insert casts to make the code happy both as 32- and 64-bit. (Sure, this is just in temporary debugging output NSLog() calls.) Change-Id: I7c05c59a76e683b3401974c2b468d1aee2de4098
This commit is contained in:
@@ -64,7 +64,7 @@ static View *theView;
|
||||
[self.window addGestureRecognizer: tapRecognizer];
|
||||
[self.window addGestureRecognizer: panRecognizer];
|
||||
|
||||
NSLog(@"statusBarOrientation: %d", [[UIApplication sharedApplication] statusBarOrientation]);
|
||||
NSLog(@"statusBarOrientation: %ld", (long) [[UIApplication sharedApplication] statusBarOrientation]);
|
||||
|
||||
if (UIInterfaceOrientationIsLandscape([[UIApplication sharedApplication] statusBarOrientation]))
|
||||
lo_set_view_size(applicationFrame.size.height, applicationFrame.size.width);
|
||||
@@ -94,7 +94,7 @@ static View *theView;
|
||||
|
||||
- (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text
|
||||
{
|
||||
NSLog(@"textView: %@ shouldChangeTextInRange:[%u,%u] replacementText:%@", textView, range.location, range.length, text);
|
||||
NSLog(@"textView: %@ shouldChangeTextInRange:[%lu,%lu] replacementText:%@", textView, (unsigned long) range.location, (unsigned long) range.length, text);
|
||||
assert(textView == theView->textView);
|
||||
|
||||
for (NSUInteger i = 0; i < [text length]; i++)
|
||||
@@ -137,7 +137,7 @@ static View *theView;
|
||||
NSLog(@"New applicationFrame: %dx%d@(%d,%d)",
|
||||
(int) applicationFrame.size.width, (int) applicationFrame.size.height,
|
||||
(int) applicationFrame.origin.x, (int) applicationFrame.origin.y);
|
||||
NSLog(@"statusBarOrientation: %d", [[UIApplication sharedApplication] statusBarOrientation]);
|
||||
NSLog(@"statusBarOrientation: %ld", (long) [[UIApplication sharedApplication] statusBarOrientation]);
|
||||
|
||||
if (UIInterfaceOrientationIsLandscape([[UIApplication sharedApplication] statusBarOrientation]))
|
||||
lo_set_view_size(applicationFrame.size.height, applicationFrame.size.width);
|
||||
|
@@ -15,7 +15,7 @@
|
||||
- (void)drawRect:(CGRect)rect
|
||||
{
|
||||
NSLog(@"drawRect: %dx%d@(%d,%d)", (int) rect.size.width, (int) rect.size.height, (int) rect.origin.x, (int) rect.origin.y);
|
||||
NSLog(@"statusBarOrientation: %d", [[UIApplication sharedApplication] statusBarOrientation]);
|
||||
NSLog(@"statusBarOrientation: %ld", (long)[[UIApplication sharedApplication] statusBarOrientation]);
|
||||
|
||||
// NSDate *startDate = [NSDate date];
|
||||
|
||||
|
@@ -29,7 +29,7 @@
|
||||
{
|
||||
(void) fromInterfaceOrientation;
|
||||
|
||||
NSLog(@"didRotateFromInterfaceOrientation: statusBarOrientation: %d interfaceOrientation: %d", [[UIApplication sharedApplication] statusBarOrientation], [self interfaceOrientation]);
|
||||
NSLog(@"didRotateFromInterfaceOrientation: statusBarOrientation: %ld interfaceOrientation: %ld", (long) [[UIApplication sharedApplication] statusBarOrientation], (long) [self interfaceOrientation]);
|
||||
}
|
||||
|
||||
@end
|
||||
|
Reference in New Issue
Block a user