From 69c0083117174d05b69a62c164fc1779e5fc55b0 Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Sat, 21 Feb 2009 10:17:09 +0800 Subject: [PATCH] Fix newly identified build warnings. Signed-off-by: Jonathan 'Wolf' Rentzsch --- Plugin/CTFMenubarMenuController.h | 2 +- Plugin/CTFMenubarMenuController.m | 6 +++--- Plugin/CTFUtilities.h | 2 +- Plugin/CTFsIFRSupport.m | 3 +-- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Plugin/CTFMenubarMenuController.h b/Plugin/CTFMenubarMenuController.h index 14d3d86b..7dc0cfb4 100644 --- a/Plugin/CTFMenubarMenuController.h +++ b/Plugin/CTFMenubarMenuController.h @@ -33,7 +33,7 @@ extern NSString* kCTFLoadAllFlashViews; extern NSString* kCTFLoadFlashViewsForWindow; extern NSString* kCTFLoadInvisibleFlashViewsForWindow; -extern NSUInteger maxInvisibleDimension; +extern NSInteger maxInvisibleDimension; @interface CTFMenubarMenuController : NSObject { diff --git a/Plugin/CTFMenubarMenuController.m b/Plugin/CTFMenubarMenuController.m index ef5d3fe4..3675169b 100644 --- a/Plugin/CTFMenubarMenuController.m +++ b/Plugin/CTFMenubarMenuController.m @@ -33,7 +33,7 @@ of this software and associated documentation files (the "Software"), to deal NSString* kCTFLoadFlashViewsForWindow = @"CTFLoadFlashViewsForWindow"; NSString* kCTFLoadInvisibleFlashViewsForWindow = @"CTFLoadInvisibleFlashViewsForWindow"; -NSUInteger maxInvisibleDimension = 8; +NSInteger maxInvisibleDimension = 8; static NSString* kApplicationsToInstallMenuInto[] = { @@ -85,7 +85,7 @@ - (int) applicationMenuPrefsInsertionLocation if( indx ) { insertLocation = [ indx intValue ]; } else { - int showPrefsItem = -1, lastSeenSep = -1; + int showPrefsItem = -1; int i; for( i = 0 ; i < count ; ++i ) { // Put it before the first separator after the preferences item. @@ -227,7 +227,7 @@ - (BOOL) _flashViewExistsForKeyWindowWithInvisibleOnly: (BOOL) mustBeInvisible NSHashEnumerator enumerator = NSEnumerateHashTable( _views ); CTFClickToFlashPlugin* item; - while( item = NSNextHashEnumeratorItem( &enumerator ) ) { + while( ( item = NSNextHashEnumeratorItem( &enumerator ) ) ) { if( [ item window ] == keyWindow ) { if( !mustBeInvisible || [ item isConsideredInvisible ] ) { rslt = YES; diff --git a/Plugin/CTFUtilities.h b/Plugin/CTFUtilities.h index 2e56f05e..8be503ca 100644 --- a/Plugin/CTFUtilities.h +++ b/Plugin/CTFUtilities.h @@ -30,5 +30,5 @@ THE SOFTWARE. #define CTFForEachObject( Type, varName, container ) \ NSEnumerator* feoEnum_##__LINE__ = [ container objectEnumerator ]; \ Type* varName; \ - while( varName = [ feoEnum_##__LINE__ nextObject ] ) + while( ( varName = [ feoEnum_##__LINE__ nextObject ] ) ) diff --git a/Plugin/CTFsIFRSupport.m b/Plugin/CTFsIFRSupport.m index 7523e8ba..1f28d7d3 100644 --- a/Plugin/CTFsIFRSupport.m +++ b/Plugin/CTFsIFRSupport.m @@ -108,8 +108,7 @@ - (BOOL) _isSIFRText: (NSDictionary*) arguments NSString* classValue = [[arguments objectForKey: WebPlugInAttributesKey] objectForKey: @"class"]; NSString* sifrValue = [[arguments objectForKey: WebPlugInAttributesKey] objectForKey: @"sifr"]; - if ([classValue isEqualToString: @"sIFR-flash"] || (sifrValue && [sifrValue boolValue])) - return YES; + return [classValue isEqualToString: @"sIFR-flash"] || (sifrValue && [sifrValue boolValue]); } @end