Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix two static analyser warnings #1781

Merged
merged 1 commit into from
Jul 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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