Authored by devel-hb

removed warnings in FMDB

@@ -297,7 +297,8 @@ static NSDateFormatter *timeFormatter = nil; @@ -297,7 +297,8 @@ static NSDateFormatter *timeFormatter = nil;
297 297
298 - (NSDate*) dateForColumnIndex:(int)columnIdx withFormatString:(NSString*)formatString 298 - (NSDate*) dateForColumnIndex:(int)columnIdx withFormatString:(NSString*)formatString
299 { 299 {
300 - NSDateFormatter *formatter = [[NSDateFormatter alloc] initWithDateFormat:formatString allowNaturalLanguage:NO]; 300 + NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
  301 + [formatter setDateFormat:formatString];
301 302
302 NSDate *d = [self dateForColumnIndex:columnIdx withFormatter:formatter]; 303 NSDate *d = [self dateForColumnIndex:columnIdx withFormatter:formatter];
303 304
@@ -326,7 +327,8 @@ static NSDateFormatter *timeFormatter = nil; @@ -326,7 +327,8 @@ static NSDateFormatter *timeFormatter = nil;
326 - (NSDate*) dateForColumnIndex:(int)columnIdx { 327 - (NSDate*) dateForColumnIndex:(int)columnIdx {
327 if (dateFormatter == nil) 328 if (dateFormatter == nil)
328 { 329 {
329 - dateFormatter = [[NSDateFormatter alloc] initWithDateFormat:@"%Y-%m-%d" allowNaturalLanguage:NO]; 330 + dateFormatter = [[NSDateFormatter alloc] init];
  331 + [dateFormatter setDateFormat:@"%Y-%m-%d"];
330 } 332 }
331 return [self dateForColumnIndex:columnIdx withFormatter:dateFormatter]; 333 return [self dateForColumnIndex:columnIdx withFormatter:dateFormatter];
332 } 334 }
@@ -352,7 +354,8 @@ static NSDateFormatter *timeFormatter = nil; @@ -352,7 +354,8 @@ static NSDateFormatter *timeFormatter = nil;
352 { 354 {
353 if (timeFormatter == nil) 355 if (timeFormatter == nil)
354 { 356 {
355 - timeFormatter = [[NSDateFormatter alloc] initWithDateFormat:@"%H:%M:%S" allowNaturalLanguage:NO]; 357 + timeFormatter = [[NSDateFormatter alloc] init];
  358 + [timeFormatter setDateFormat:@"%H:%M:%S"];
356 } 359 }
357 return [self dateForColumnIndex:columnIdx withFormatter:timeFormatter]; 360 return [self dateForColumnIndex:columnIdx withFormatter:timeFormatter];
358 } 361 }
@@ -7,7 +7,7 @@ int main (int argc, const char * argv[]) { @@ -7,7 +7,7 @@ int main (int argc, const char * argv[]) {
7 7
8 // delete the old db. 8 // delete the old db.
9 NSFileManager *fileManager = [NSFileManager defaultManager]; 9 NSFileManager *fileManager = [NSFileManager defaultManager];
10 - [fileManager removeFileAtPath:@"/tmp/tmp.db" handler:nil]; 10 + [fileManager removeItemAtPath:@"/tmp/tmp.db" error:NULL];
11 11
12 FMDatabase* db = [FMDatabase databaseWithPath:@"/tmp/tmp.db"]; 12 FMDatabase* db = [FMDatabase databaseWithPath:@"/tmp/tmp.db"];
13 if (![db open]) { 13 if (![db open]) {