aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/SPFileHandle.m2
-rw-r--r--Source/SPUserManager.m2
-rw-r--r--Source/SPWindowController.m8
3 files changed, 5 insertions, 7 deletions
diff --git a/Source/SPFileHandle.m b/Source/SPFileHandle.m
index 94c26211..41c15b09 100644
--- a/Source/SPFileHandle.m
+++ b/Source/SPFileHandle.m
@@ -210,7 +210,7 @@
*/
- (NSMutableData *)readDataOfLength:(NSUInteger)length
{
- long theDataLength;
+ long theDataLength = 0;
void *theData = malloc(length);
if (useCompression) {
diff --git a/Source/SPUserManager.m b/Source/SPUserManager.m
index ad6ac390..eaece4b2 100644
--- a/Source/SPUserManager.m
+++ b/Source/SPUserManager.m
@@ -1332,7 +1332,7 @@ static const NSString *SPTableViewNameColumnID = @"NameColumn";
*/
- (void)_renameUserFrom:(NSString *)originalUser host:(NSString *)originalHost to:(NSString *)newUser host:(NSString *)newHost
{
- NSString *renameQuery;
+ NSString *renameQuery = nil;
if ([serverSupport supportsRenameUser]) {
renameQuery = [NSString stringWithFormat:@"RENAME USER %@@%@ TO %@@%@",
diff --git a/Source/SPWindowController.m b/Source/SPWindowController.m
index eeecca68..10c64586 100644
--- a/Source/SPWindowController.m
+++ b/Source/SPWindowController.m
@@ -213,9 +213,8 @@ enum {
/**
* Move the currently selected tab to a new window.
*/
-- (IBAction) moveSelectedTabInNewWindow:(id)sender
+- (IBAction)moveSelectedTabInNewWindow:(id)sender
{
-
static NSPoint cascadeLocation = {.x = 0, .y = 0};
SPDatabaseDocument *selectedDocument = [[tabView selectedTabViewItem] identifier];
@@ -226,6 +225,7 @@ enum {
NSWindow *newWindow = [newWindowController window];
CGFloat toolbarHeight = 0;
+
if ([[[self window] toolbar] isVisible]) {
NSRect innerFrame = [NSWindow contentRectForFrameRect:[[self window] frame] styleMask:[[self window] styleMask]];
toolbarHeight = innerFrame.size.height - [[[self window] contentView] frame].size.height;
@@ -277,8 +277,7 @@ enum {
// Update tabBar of the new window
[newWindowController tabView:[tabBar tabView] didDropTabViewItem:[selectedCell representedObject] inTabBar:control];
- [newWindow makeKeyAndOrderFront:nil];
-
+ [newWindow makeKeyAndOrderFront:nil];
}
/**
@@ -291,7 +290,6 @@ enum {
[[NSUserDefaults standardUserDefaults] setBool:![tabBar hideForSingleTab] forKey:SPAlwaysShowWindowTabBar];
}
-
/**
* Menu validation
*/