Browse Source

fix some static analyzer warnings

Tobias Conradi 10 years ago
parent
commit
6dbbeedff2

+ 1 - 2
Sources/VLCHTTPConnection.m

@@ -497,8 +497,7 @@
 {
 {
     NSString *subtitlePath = @"";
     NSString *subtitlePath = @"";
     NSString *fileName = [[fileURL lastPathComponent] stringByDeletingPathExtension];
     NSString *fileName = [[fileURL lastPathComponent] stringByDeletingPathExtension];
-    NSMutableArray *listOfSubtitle = [[NSMutableArray alloc] init];
-    listOfSubtitle = [self _listOfSubtitle];
+    NSMutableArray *listOfSubtitle = [self _listOfSubtitle];
     NSString *fileSub;
     NSString *fileSub;
     for (int count = 0; count < listOfSubtitle.count; count++) {
     for (int count = 0; count < listOfSubtitle.count; count++) {
         fileSub = [NSString stringWithFormat:@"%@", listOfSubtitle[count]];
         fileSub = [NSString stringWithFormat:@"%@", listOfSubtitle[count]];

+ 1 - 0
Sources/VLCMigrationViewController.m

@@ -22,6 +22,7 @@
 }
 }
 
 
 - (void)viewDidLoad {
 - (void)viewDidLoad {
+    [super viewDidLoad];
     [self.statusLabel setText:NSLocalizedString(@"UPGRADING_LIBRARY", "")];
     [self.statusLabel setText:NSLocalizedString(@"UPGRADING_LIBRARY", "")];
     dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
     dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
         NSLog(@"migrating coredata");
         NSLog(@"migrating coredata");

+ 1 - 2
Sources/VLCSharedLibraryParser.m

@@ -44,8 +44,7 @@
 
 
 - (BOOL)isVLCMediaServer:(NSString *)adress port:(NSString *)port
 - (BOOL)isVLCMediaServer:(NSString *)adress port:(NSString *)port
 {
 {
-    NSMutableArray *mutableObjectList = [[NSMutableArray alloc] init];
-    mutableObjectList = [self VLCLibraryServerParser:adress port:port];
+    NSMutableArray *mutableObjectList = [self VLCLibraryServerParser:adress port:port];
     if (mutableObjectList.count > 0) {
     if (mutableObjectList.count > 0) {
         NSString *identifier = [[mutableObjectList objectAtIndex:0] objectForKey:@"identifier"];
         NSString *identifier = [[mutableObjectList objectAtIndex:0] objectForKey:@"identifier"];
         if ([identifier isEqualToString:@"org.videolan.vlc-ios"])
         if ([identifier isEqualToString:@"org.videolan.vlc-ios"])