Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Handled a couple of warnings - and one potential bug - thrown by Xcod…

…e 4.2.1 when compiled using LLVM compiler 3.0 (as discussed with Peter).
  • Loading branch information...
commit 862f2f61d2ae88c337c62e2e5803269ad0a44bf7 1 parent 5721575
@zykloman zykloman authored
View
3  IMBImageCaptureParser.m
@@ -683,8 +683,7 @@ - (void) _gotICANotification:(NSString *) aNotification withDictionary:(NSDictio
} // end lock
}
- if( !objectID &&
- [aNotification isEqualTo:(NSString *)kICANotificationTypeStoreAdded] ||
+ if( (!objectID && [aNotification isEqualTo:(NSString *)kICANotificationTypeStoreAdded]) ||
[aNotification isEqualTo:(NSString *)kICANotificationTypeStoreRemoved] )
{
// Reload the device
View
8 IMBLibraryController.m
@@ -672,7 +672,7 @@ - (void) _replaceNode:(IMBNode*)inOldNode withNode:(IMBNode*)inNewNode parentNod
if (inOldNode)
{
- if (watchedPath = inOldNode.watchedPath)
+ if ((watchedPath = inOldNode.watchedPath))
{
if (inOldNode.watcherType == kIMBWatcherTypeKQueue)
[self.watcherUKKQueue removePath:watchedPath];
@@ -691,7 +691,7 @@ - (void) _replaceNode:(IMBNode*)inOldNode withNode:(IMBNode*)inNewNode parentNod
if (index == NSNotFound) index = nodes.count;
[nodes insertObject:inNewNode atIndex:index];
- if (watchedPath = inNewNode.watchedPath)
+ if ((watchedPath = inNewNode.watchedPath))
{
if (inNewNode.watcherType == kIMBWatcherTypeKQueue)
[self.watcherUKKQueue addPath:watchedPath];
@@ -934,9 +934,9 @@ + (NSArray*) _rootPathsForPaths:(NSArray*)inAllPaths
{
// First eliminate any existing rootPaths that are subpaths of a new path...
- NSUInteger n = [rootPaths count];
+ NSInteger n = [rootPaths count];
- for (NSUInteger i=n-1; i>=0; i--)
+ for (NSInteger i=n-1; i>=0; i--)
{
NSString* rootPath = [rootPaths objectAtIndex:i];
View
6 IMBNodeViewController.m
@@ -821,7 +821,7 @@ - (void) _nodesDidChange
NSMutableArray* expandedNodeIdentifiers = [NSMutableArray arrayWithArray:self.expandedNodeIdentifiers];
- while (count = [expandedNodeIdentifiers count])
+ while ((count = [expandedNodeIdentifiers count]))
{
rows = [ibNodeOutlineView numberOfRows];
@@ -1050,7 +1050,7 @@ - (void) __syncPopupMenuSelection
- (BOOL) canAddNode
{
IMBNode* node = [self selectedNode];
- return node == nil || node.isGroup && node.groupType == kIMBGroupTypeFolder;
+ return node == nil || (node.isGroup && node.groupType == kIMBGroupTypeFolder);
}
@@ -1138,7 +1138,7 @@ - (NSMenu*) menuForNode:(IMBNode*)inNode
// First we'll add standard menu items...
- if (inNode==nil || inNode.isGroup && inNode.groupType==kIMBGroupTypeFolder)
+ if (inNode==nil || (inNode.isGroup && inNode.groupType==kIMBGroupTypeFolder))
{
title = NSLocalizedStringWithDefaultValue(
@"IMBNodeViewController.menuItem.add",
View
6 IMBObjectViewController.m
@@ -1038,7 +1038,7 @@ - (NSMenu*) menuForObject:(IMBObject*)inObject
{
id location = [inObject location];
NSURL* url = (NSURL*)location;
- BOOL localFile = [location isKindOfClass:[NSString class]] || [location isKindOfClass:[NSURL class]] && [url isFileURL];
+ BOOL localFile = [location isKindOfClass:[NSString class]] || ([location isKindOfClass:[NSURL class]] && [url isFileURL]);
if (localFile)
{
@@ -1072,7 +1072,7 @@ - (NSMenu*) menuForObject:(IMBObject*)inObject
// Open with editor app...
- if (appPath = [IMBConfig editorAppForMediaType:self.mediaType])
+ if ((appPath = [IMBConfig editorAppForMediaType:self.mediaType]))
{
title = NSLocalizedStringWithDefaultValue(
@"IMBObjectViewController.menuItem.openWithApp",
@@ -1092,7 +1092,7 @@ - (NSMenu*) menuForObject:(IMBObject*)inObject
// Open with viewer app...
- if (appPath = [IMBConfig viewerAppForMediaType:self.mediaType])
+ if ((appPath = [IMBConfig viewerAppForMediaType:self.mediaType]))
{
title = NSLocalizedStringWithDefaultValue(
@"IMBObjectViewController.menuItem.openWithApp",
View
2  IMBURLDownloadOperation.h
@@ -54,7 +54,7 @@
// This helper class is being used by IMBRemoteObjectsPromise. Not for general use...
-@interface IMBURLDownloadOperation : NSOperation
+@interface IMBURLDownloadOperation : NSOperation <NSURLDownloadDelegate>
{
id _delegate;
id _delegateReference;
View
3  IMBiPhotoParser.m
@@ -773,8 +773,7 @@ - (NSString*) imagePathForFaceIndex:(NSNumber*)inFaceIndex inImageWithKey:(NSStr
NSString* replacement = @"/Data.noindex/";
NSScanner* aScanner = [[NSScanner alloc] initWithString:imagePath];
- if ([aScanner scanString:pathPrefix intoString:nil] &&
- [aScanner scanString:@"/Data/" intoString:nil] ||
+ if (([aScanner scanString:pathPrefix intoString:nil] && [aScanner scanString:@"/Data/" intoString:nil]) ||
[aScanner scanString:@"/Thumbnails/" intoString:nil])
{
NSString* suffixString = [imagePath substringFromIndex:[aScanner scanLocation]];
View
2  UKFNSubscribeFileWatcher.m
@@ -117,7 +117,7 @@ -(void) addPath: (NSString*)path
kNilOptions, &subscription );
if( err != noErr )
{
- NSLog( @"UKFNSubscribeFileWatcher addPath: %@ failed due to error ID=%ld.", path, err );
+ NSLog( @"UKFNSubscribeFileWatcher addPath: %@ failed due to error ID=%d.", path, err );
return;
}
View
2  UKKQueue.m
@@ -410,7 +410,7 @@ -(void) watcherThread: (id)sender
n = kevent( queueFD, NULL, 0, &ev, 1, &timeout );
if( n > 0 )
{
- NSLog( @"KEVENT returned %d", n );
+ NSLog( @"KEVENT returned %ld", n );
if( ev.filter == EVFILT_VNODE )
{
NSLog( @"KEVENT filter is EVFILT_VNODE" );

0 comments on commit 862f2f6

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