Browse Source

clean up warnings

Kevin Bradley 1 year ago
parent
commit
60180efc2f

+ 6 - 6
bootstrapTool.xcodeproj/project.pbxproj

@@ -14,7 +14,7 @@
 		325A24BE20E83F8C001D1BAD /* StatusPackageModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 325A24AE20E83EF8001D1BAD /* StatusPackageModel.m */; };
 		325A24BF20E83F95001D1BAD /* NSObject+Additions.m in Sources */ = {isa = PBXBuildFile; fileRef = 325A24B220E83EF8001D1BAD /* NSObject+Additions.m */; };
 		325A24C020E83F97001D1BAD /* NSString+Additions.m in Sources */ = {isa = PBXBuildFile; fileRef = 325A24B420E83EF8001D1BAD /* NSString+Additions.m */; };
-		325A24C120E83FCA001D1BAD /* InputPackageFIle.m in Sources */ = {isa = PBXBuildFile; fileRef = 325A24B820E83EF8001D1BAD /* InputPackageFIle.m */; };
+		325A24C120E83FCA001D1BAD /* InputPackageFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 325A24B820E83EF8001D1BAD /* InputPackageFile.m */; };
 		32B2C838236BC8270085F065 /* Universalize.m in Sources */ = {isa = PBXBuildFile; fileRef = 32B2C837236BC8270085F065 /* Universalize.m */; };
 		4C56B59D29E670DD00D47844 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C56B59C29E670DD00D47844 /* main.m */; };
 		4C56B5A129E670F000D47844 /* Universalize.m in Sources */ = {isa = PBXBuildFile; fileRef = 32B2C837236BC8270085F065 /* Universalize.m */; };
@@ -54,8 +54,8 @@
 		325A24B420E83EF8001D1BAD /* NSString+Additions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSString+Additions.m"; sourceTree = "<group>"; };
 		325A24B520E83EF8001D1BAD /* InputPackage.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = InputPackage.h; sourceTree = "<group>"; };
 		325A24B620E83EF8001D1BAD /* InputPackage.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = InputPackage.m; sourceTree = "<group>"; };
-		325A24B720E83EF8001D1BAD /* InputPackageFIle.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = InputPackageFIle.h; sourceTree = "<group>"; };
-		325A24B820E83EF8001D1BAD /* InputPackageFIle.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = InputPackageFIle.m; sourceTree = "<group>"; };
+		325A24B720E83EF8001D1BAD /* InputPackageFile.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = InputPackageFile.h; sourceTree = "<group>"; };
+		325A24B820E83EF8001D1BAD /* InputPackageFile.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = InputPackageFile.m; sourceTree = "<group>"; };
 		325A24BA20E83F46001D1BAD /* ErrorReturn.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ErrorReturn.h; sourceTree = "<group>"; };
 		325A24BB20E83F46001D1BAD /* ErrorReturn.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ErrorReturn.m; sourceTree = "<group>"; };
 		325A24C220E84033001D1BAD /* Defines.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Defines.h; path = Classes/Defines.h; sourceTree = "<group>"; };
@@ -128,8 +128,8 @@
 				325A24B420E83EF8001D1BAD /* NSString+Additions.m */,
 				325A24B520E83EF8001D1BAD /* InputPackage.h */,
 				325A24B620E83EF8001D1BAD /* InputPackage.m */,
-				325A24B720E83EF8001D1BAD /* InputPackageFIle.h */,
-				325A24B820E83EF8001D1BAD /* InputPackageFIle.m */,
+				325A24B720E83EF8001D1BAD /* InputPackageFile.h */,
+				325A24B820E83EF8001D1BAD /* InputPackageFile.m */,
 			);
 			path = Classes;
 			sourceTree = "<group>";
@@ -226,7 +226,7 @@
 				325A24BD20E83F7E001D1BAD /* InputPackage.m in Sources */,
 				325A24BC20E83F46001D1BAD /* ErrorReturn.m in Sources */,
 				325A24B920E83F09001D1BAD /* HelperClass.m in Sources */,
-				325A24C120E83FCA001D1BAD /* InputPackageFIle.m in Sources */,
+				325A24C120E83FCA001D1BAD /* InputPackageFile.m in Sources */,
 				325A24BF20E83F95001D1BAD /* NSObject+Additions.m in Sources */,
 				3249302B20E4E29700E99767 /* main.m in Sources */,
 				325A24BE20E83F8C001D1BAD /* StatusPackageModel.m in Sources */,

+ 41 - 118
bootstrapTool/Classes/HelperClass.m

@@ -4,8 +4,7 @@
 
 @implementation HelperClass
 
-+ (NSArray <StatusPackageModel*>*)statusInstalledPackagesFromFile:(NSString *)statusFile
-{
++ (NSArray <StatusPackageModel*>*)statusInstalledPackagesFromFile:(NSString *)statusFile {
     
     if (![FM fileExistsAtPath:statusFile]) {
         return nil;
@@ -15,56 +14,42 @@
     //DLog(@"lineArray: %@", lineArray);
     NSMutableArray *mutableList = [[NSMutableArray alloc] init];
     //NSMutableDictionary *mutableDict = [[NSMutableDictionary alloc] init];
-    for (id currentItem in lineArray)
-    {
-        
+    for (id currentItem in lineArray) {
         StatusPackageModel *debModel = [[StatusPackageModel alloc] initWithRawControlString:currentItem];
         if (debModel != nil)
             [mutableList addObject:debModel];
     }
-    
     NSSortDescriptor *nameDescriptor = [[NSSortDescriptor alloc] initWithKey:@"name" ascending:YES
                                                                     selector:@selector(localizedCaseInsensitiveCompare:)];
     NSSortDescriptor *packageDescriptor = [[NSSortDescriptor alloc] initWithKey:@"package" ascending:YES
                                                                        selector:@selector(localizedCaseInsensitiveCompare:)];
     NSArray *descriptors = [NSArray arrayWithObjects:nameDescriptor, packageDescriptor, nil];
     NSArray *sortedArray = [mutableList sortedArrayUsingDescriptors:descriptors];
-    
-    
     mutableList = nil;
-    
     return sortedArray;
 }
 
 + (BOOL)shouldContinueWithError:(NSString *)errorMessage {
-    
     NSString *errorString = [NSString stringWithFormat:@"\n%@ Are you sure you want to continue? [y/n]?", errorMessage];
-    
     char c;
     printf("%s", [errorString UTF8String] );
     c=getchar();
-    while(c!='y' && c!='n')
-    {
+    while(c!='y' && c!='n') {
         if (c!='\n'){
             printf("[y/n]");
         }
         c=getchar();
     }
-    
-    if (c == 'n')
-    {
+    if (c == 'n') {
         DLog(@"\nSmart move... exiting\n\n");
         return FALSE;
     } else if (c == 'y') {
         DLog(@"\nDon't say we didn't warn ya!....\n");
     }
-    
     return TRUE;
-    
 }
 
-+ (NSArray *)arrayReturnForTask:(NSString *)taskBinary withArguments:(NSArray *)taskArguments
-{
++ (NSArray *)arrayReturnForTask:(NSString *)taskBinary withArguments:(NSArray *)taskArguments {
     NSLog(@"%@ %@", taskBinary, [taskArguments componentsJoinedByString:@" "]);
     NSTask *task = [[NSTask alloc] init];
     NSPipe *pipe = [[NSPipe alloc] init];
@@ -74,40 +59,30 @@
     [task setArguments:taskArguments];
     [task setStandardOutput:pipe];
     [task setStandardError:pipe];
-    
     [task launch];
-    
     NSData *outData = nil;
     NSString *temp = nil;
-    while((outData = [handle readDataToEndOfFile]) && [outData length])
-    {
+    while((outData = [handle readDataToEndOfFile]) && [outData length]) {
         temp = [[NSString alloc] initWithData:outData encoding:NSASCIIStringEncoding];
-        
     }
     [handle closeFile];
     task = nil;
-    
     return [temp componentsSeparatedByString:@"\n"];
-    
 }
 
-+ (NSString *)singleLineReturnForProcess:(NSString *)call
-{
++ (NSString *)singleLineReturnForProcess:(NSString *)call {
     return [[self returnForProcess:call] componentsJoinedByString:@"\n"];
 }
 
-+ (NSArray *)returnForProcess:(NSString *)call
-{
++ (NSArray *)returnForProcess:(NSString *)call {
     if (call==nil)
         return 0;
     char line[200];
     DLog(@"\nRunning process: %@\n", call);
     FILE* fp = popen([call UTF8String], "r");
     NSMutableArray *lines = [[NSMutableArray alloc]init];
-    if (fp)
-    {
-        while (fgets(line, sizeof line, fp))
-        {
+    if (fp) {
+        while (fgets(line, sizeof line, fp)) {
             NSString *s = [NSString stringWithCString:line encoding:NSUTF8StringEncoding];
             s = [s stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
             [lines addObject:s];
@@ -130,12 +105,8 @@
     [newString replaceOccurrencesOfString:@"    " withString:@" " options:NSLiteralSearch range:NSMakeRange(0, [newString length])];
     [newString replaceOccurrencesOfString:@"   " withString:@" " options:NSLiteralSearch range:NSMakeRange(0, [newString length])];
     [newString replaceOccurrencesOfString:@"  " withString:@" " options:NSLiteralSearch range:NSMakeRange(0, [newString length])];
-    
     NSArray *lineObjects = [newString componentsSeparatedByString:@" "];
-    
     //NSLog(@"lineObjects: %@", lineObjects);
-    
-    
     /*
      
      "drwxr-xr-x",
@@ -145,8 +116,6 @@
      "01:21",
      "./"
      */
-    
-    
     NSString *permissionsAndType = [lineObjects objectAtIndex:0];
     NSString *userGroup = [lineObjects objectAtIndex:1];
     NSString *size = [lineObjects objectAtIndex:2];
@@ -156,7 +125,6 @@
     
     //@"drwxr-xr-x"
     NSString *fileTypeChar = [permissionsAndType substringWithRange:NSMakeRange(0, 1)];
-    
     NSString *octalPermissions = [self octalFromSymbols:permissionsAndType];
     NSString *octalUG = [self octalFromGroupSymbols:userGroup];
     NSString *fileName = [path lastPathComponent];
@@ -169,7 +137,6 @@
     switch (pf.type) {
         case BSPackageFileTypeLink:
         {
-            
             fullPath = [lineObjects objectAtIndex:7];
             NSString *linkDest = [NSString stringWithFormat:@"/%@", path];
             pf.permissions = octalPermissions;
@@ -216,70 +183,49 @@
 }
 
 
-+ (NSString *)octalFromGroupSymbols:(NSString *)theSymbols
-{
++ (NSString *)octalFromGroupSymbols:(NSString *)theSymbols {
     NSArray *groupArray = [theSymbols componentsSeparatedByString:@"/"];
     NSString *user = [groupArray objectAtIndex:0];
     NSString *group = [groupArray objectAtIndex:1];
-    
     NSString *octalUser = nil;
     NSString *octalGroup = nil;
     //uid=0(root) gid=0(wheel) groups=0(wheel),1(daemon),2(kmem),3(sys),4(tty),5(operator),8(procview),9(procmod),20(staff),29(certusers),80(admin)
-    if ([user isEqualToString:@"root"])
-    {
+    if ([user isEqualToString:@"root"]) {
         octalUser = @"0";
-    } else if ([user isEqualToString:@"mobile"])
-    {
+    } else if ([user isEqualToString:@"mobile"]) {
         octalUser = @"501";
     }
     //obviously more cases!! FIXME:
-    
-    if ([group isEqualToString:@"staff"])
-    {
+    if ([group isEqualToString:@"staff"]) {
         octalGroup = @"20";
-    } else if ([group isEqualToString:@"admin"])
-    {
+    } else if ([group isEqualToString:@"admin"]) {
         octalGroup = @"80";
-    } else if ([group isEqualToString:@"wheel"])
-    {
+    } else if ([group isEqualToString:@"wheel"]) {
         octalGroup = @"0";
-    } else if ([group isEqualToString:@"daemon"])
-    {
+    } else if ([group isEqualToString:@"daemon"]) {
         octalGroup = @"1";
-    } else if ([group isEqualToString:@"kmem"])
-    {
+    } else if ([group isEqualToString:@"kmem"]) {
         octalGroup = @"2";
-    } else if ([group isEqualToString:@"sys"])
-    {
+    } else if ([group isEqualToString:@"sys"]) {
         octalGroup = @"3";
-    } else if ([group isEqualToString:@"tty"])
-    {
+    } else if ([group isEqualToString:@"tty"]) {
         octalGroup = @"4";
-    } else if ([group isEqualToString:@"operator"])
-    {
+    } else if ([group isEqualToString:@"operator"]) {
         octalGroup = @"5";
-    } else if ([group isEqualToString:@"procview"])
-    {
+    } else if ([group isEqualToString:@"procview"]) {
         octalGroup = @"8";
-    } else if ([group isEqualToString:@"procmod"])
-    {
+    } else if ([group isEqualToString:@"procmod"]) {
         octalGroup = @"9";
-    } else if ([group isEqualToString:@"certusers"])
-    {
+    } else if ([group isEqualToString:@"certusers"]) {
         octalGroup = @"29";
-    } else
-    {
+    } else {
         octalGroup = @"501"; //default to mobile
     }
     //uid=0(root) gid=0(wheel) groups=0(wheel),1(daemon),2(kmem),3(sys),4(tty),5(operator),8(procview),9(procmod),20(staff),29(certusers),80(admin)
     return [NSString stringWithFormat:@"%@:%@", octalUser, octalGroup];
-    
 }
 
 
-
-
-
 + (InputPackage *)packageForDeb:(NSString *)debFile {
     
     NSString *packageName = [self singleLineReturnForProcess:[NSString stringWithFormat:@"/usr/local/bin/dpkg -f %@ Package", debFile]];
@@ -307,8 +253,7 @@
     
 }
 
-+ (NSString *)octalFromSymbols:(NSString *)theSymbols
-{
++ (NSString *)octalFromSymbols:(NSString *)theSymbols {
     //NSLog(@"%@ %s", self, _cmd);
     NSString *U = [theSymbols substringWithRange:NSMakeRange(1, 3)];
     NSString *G = [theSymbols substringWithRange:NSMakeRange(4, 3)];
@@ -321,27 +266,20 @@
     //USER
     
     int sIdBit = 0;
-    
     int uOctal = 0;
-    
     const char *uArray = [U cStringUsingEncoding:NSASCIIStringEncoding];
-    int stringLength = [U length];
+    NSInteger stringLength = [U length];
     
     int x;
-    for( x=0; x<stringLength; x++ )
-    {
+    for( x=0; x<stringLength; x++ ) {
         unsigned int aCharacter = uArray[x];
-        if (aCharacter == 'r')
-        {
+        if (aCharacter == 'r') {
             uOctal += 4;
-        } else     if (aCharacter == 'w')
-        {
+        } else if (aCharacter == 'w') {
             uOctal += 2;
-        } else     if (aCharacter == 'x')
-        {
+        } else if (aCharacter == 'x') {
             uOctal += 1;
-        } else     if (aCharacter == 's')
-        {
+        } else if (aCharacter == 's') {
             sIdBit += 4;
         }
     }
@@ -353,49 +291,34 @@
     stringLength = [G length];
     
     int y;
-    for( y=0; y<stringLength; y++ )
-    {
+    for( y=0; y<stringLength; y++ ) {
         unsigned int aCharacter = gArray[y];
-        if (aCharacter == 'r')
-        {
+        if (aCharacter == 'r') {
             gOctal += 4;
-        } else     if (aCharacter == 'w')
-        {
+        } else if (aCharacter == 'w') {
             gOctal += 2;
-        } else     if (aCharacter == 'x')
-        {
+        } else if (aCharacter == 'x') {
             gOctal += 1;
-        } else     if (aCharacter == 's')
-        {
+        } else if (aCharacter == 's') {
             gOctal += 2;
         }
     }
-    
     //OTHERS
     int z;
     int oOctal = 0;
     const char *oArray = [O cStringUsingEncoding:NSASCIIStringEncoding];
     stringLength = [O length];
-    
-    
-    for( z=0; z<stringLength; z++ )
-    {
+    for( z=0; z<stringLength; z++ ) {
         unsigned int aCharacter = oArray[z];
-        if (aCharacter == 'r')
-        {
+        if (aCharacter == 'r') {
             oOctal += 4;
-        } else     if (aCharacter == 'w')
-        {
+        } else if (aCharacter == 'w') {
             oOctal += 2;
-        } else     if (aCharacter == 'x')
-        {
+        } else if (aCharacter == 'x') {
             oOctal += 1;
         }
     }
-    
-    
     return [NSString stringWithFormat:@"%i%i%i%i", sIdBit, uOctal, gOctal, oOctal];
-    
 }
 
 @end

+ 3 - 1
bootstrapTool/Classes/InputPackage.h

@@ -1,7 +1,9 @@
 
 //the input deb file that is processing
 
-#import "InputPackageFile.h"
+//#import "InputPackageFile.h"
+
+@class InputPackageFile;
 
 @interface InputPackage: NSObject
 

+ 16 - 12
bootstrapTool/Classes/InputPackage.m

@@ -2,6 +2,7 @@
 #import "ErrorReturn.h"
 #import "HelperClass.h"
 #import "Universalize.h"
+#import "InputPackageFile.h"
 
 @implementation InputPackage
 
@@ -104,15 +105,15 @@
     DLog(@"\nExtracting deb for processing...\n");
     [HelperClass returnForProcess:[NSString stringWithFormat:@"/usr/local/bin/dpkg -x %@ %@", self.path, tmpPath]];
     
-    NSString *bootstrapInfoPath = [bootstrapPath stringByAppendingPathComponent:@"Library/dpkg/info"];
+    //NSString *bootstrapInfoPath = [bootstrapPath stringByAppendingPathComponent:@"Library/dpkg/info"];
     
-    NSString *listFile = [bootstrapInfoPath stringByAppendingPathComponent:[NSString stringWithFormat:@"%@.list", self.packageName]];
-    NSString *md5s = [bootstrapInfoPath stringByAppendingPathComponent:[NSString stringWithFormat:@"%@.md5sums", self.packageName]];
+    //NSString *listFile = [bootstrapInfoPath stringByAppendingPathComponent:[NSString stringWithFormat:@"%@.list", self.packageName]];
+    //NSString *md5s = [bootstrapInfoPath stringByAppendingPathComponent:[NSString stringWithFormat:@"%@.md5sums", self.packageName]];
     
-    DLog(@"\nCreating list file '%@'...\n", listFile);
+    //DLog(@"\nCreating list file '%@'...\n", listFile);
     
-    NSString *listString = [NSString stringWithFormat:@"/usr/bin/find %@ -type f -not -path \"*.DS_Store*\" | /usr/bin/sed \"s|%@||g\" >> \"%@\"", tmpPath, tmpPath, listFile];
-    NSString *listOutput = [HelperClass singleLineReturnForProcess:listString];
+    //NSString *listString = [NSString stringWithFormat:@"/usr/bin/find %@ -type f -not -path \"*.DS_Store*\" | /usr/bin/sed \"s|%@||g\" >> \"%@\"", tmpPath, tmpPath, listFile];
+    //NSString *listOutput = [HelperClass singleLineReturnForProcess:listString];
     
     //DLog(@"list output: %@", listOutput);
     
@@ -123,7 +124,7 @@
     //find "$BUILD_ROOT/$WORKING_DIR/deb" -type f -not -path "$BUILD_ROOT/$WORKING_DIR/deb/DEBIAN/*" -exec $MD5 {} \; |  awk '{ print $1 "  " $2 }' | sed "s|$BUILD_ROOT/$WORKING_DIR/deb/||g" >> "$SKEL_PREFIX/var/lib/dpkg/info/$PKG_NAME.md5sums"
     
     //[self.listfile writeToFile:listFile atomically:TRUE encoding:NSASCIIStringEncoding error:nil];
-    
+    /*
     DLog(@"\nGenerating md5sums...\n");
     NSString *runString = [NSString stringWithFormat:@"/usr/bin/find %@ -type f -not -path \"*.DS_Store*\" -exec /sbin/md5 -r {} \\; |  /usr/bin/awk '{ print $1 \"  \" $2 }' | /usr/bin/sed \"s|%@||g\" >> \"%@\"", tmpPath, tmpPath, md5s];
     NSString *outputs = [[HelperClass returnForProcess:runString] componentsJoinedByString:@"\n"];
@@ -131,7 +132,7 @@
     DLog(@"\nCreating md5sum file '%@'...\n", md5s);
     
     //[outputs writeToFile:md5s atomically:TRUE encoding:NSASCIIStringEncoding error:nil];
-    
+    */
     [man createDirectoryAtPath:debian withIntermediateDirectories:TRUE attributes:nil error:nil];
     
     DLog(@"\nExtracting DEBIAN files for processing...\n");
@@ -362,9 +363,10 @@
     NSMutableString *controlFile = [[NSMutableString alloc] initWithContentsOfFile:controlPath encoding:NSASCIIStringEncoding error:nil];
     //@"appletvos-arm64"
     [controlFile replaceOccurrencesOfString:self.version withString:[self.version nextVersionNumber] options:NSLiteralSearch range:NSMakeRange(0, [controlFile length])];
-    
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
     [controlFile writeToFile:controlPath atomically:TRUE];
-    
+
     //at this point we have the files extracted, time to determine what needs to be changed
     
     NSArray *ignoreFiles = @[@".fauxsu", @".DS_Store"];
@@ -498,7 +500,7 @@
                     [lines removeObjectAtIndex:markedForDeath];
                     NSString *newString = [lines componentsJoinedByString:@"\n"];
                     [newString writeToFile:postinst atomically:TRUE];
-                    
+#pragma clang diagnostic pop
                 }
                 
             }
@@ -519,8 +521,10 @@
         
         [controlFile replaceOccurrencesOfString:@"darwin-arm64" withString:newArch options:NSLiteralSearch range:NSMakeRange(0, [controlFile length])];
         
-        
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
         [controlFile writeToFile:controlPath atomically:TRUE];
+#pragma clang diagnostic pop
     }
     
     //at this point we have the files extracted, time to determine what needs to be changed

+ 9 - 5
bootstrapTool/main.m

@@ -165,8 +165,10 @@ int main(int argc, char **argv) {
             //clean up any errant spaces
             listContents = [listContents stringByReplacingOccurrencesOfString:@"\n\n\n" withString:@"\n\n"];
             listContents = [listContents stringByReplacingOccurrencesOfString:@"\n\n\n\n" withString:@"\n\n"];
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
             [listContents writeToFile:statusFile atomically:TRUE];
-            
+#pragma clang diagnostic pop
             DLog(@"\n [INFO] Cleaning status file: %@", statusFile);
             
             NSString *testStatusFile = [bootstrapPath stringByAppendingPathComponent:@"Library/dpkg/status"];
@@ -215,9 +217,10 @@ int main(int argc, char **argv) {
             testStatusFile = [testStatusFile stringByReplacingOccurrencesOfString:@"\n\n\n" withString:@"\n\n"];
             
             DLog(@"\n Writing new output file: %@\n", testStatusFile);
-            
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
             [newStatusFile writeToFile:testStatusFile atomically:TRUE];
-            
+#pragma clang diagnostic pop
             DLog(@"\n Done!\n\n");
             
             return 0;
@@ -333,9 +336,10 @@ int main(int argc, char **argv) {
                     }
                     
                 }];
-                
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
                 [newStatusFile writeToFile:statusFile atomically:TRUE];
-                
+#pragma clang diagnostic pop
                 
                 if (postRmFile) {