Skip to content

Commit

Permalink
Fix two static analyser warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Eitot committed Jul 26, 2024
1 parent 426dc36 commit cf332d0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Vienna/Sources/Database/Database.m
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,11 @@ + (instancetype)sharedManager {
* @return YES if the database is at the correct version and good to go
*/
- (BOOL)initialiseDatabase {
__block BOOL success;
__block BOOL success = NO;
[self.databaseQueue inDatabase:^(FMDatabase *db) {
success = [db executeStatements:@"PRAGMA quick_check;"];
}];
if (!success) {
if (self.databaseQueue && !success) {
NSAlert * alert = [NSAlert new];
alert.alertStyle = NSAlertStyleCritical;
alert.messageText = NSLocalizedString(@"Vienna's database seems to be corrupted. Would you like to quit Vienna or continue anyway?",
Expand Down
3 changes: 1 addition & 2 deletions Vienna/Sources/Main window/FoldersTree.m
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,7 @@ -(void)reloadDatabase:(NSArray *)stateArray
if ((folder.type == VNAFolderTypeRSS || folder.type == VNAFolderTypeOpenReader)
&& ![installedFolders containsObject:folder])
{
TreeNode *subNode;
subNode = [[TreeNode alloc] init:self.rootNode atIndex:-1 folder:folder canHaveChildren:NO];
(void)[[TreeNode alloc] init:self.rootNode atIndex:-1 folder:folder canHaveChildren:NO];
}
}
}
Expand Down

0 comments on commit cf332d0

Please sign in to comment.