From 1bfe991970009b1e7011823a00e676271fc04055 Mon Sep 17 00:00:00 2001 From: stuconnolly Date: Mon, 15 Mar 2010 17:08:18 +0000 Subject: Fix a couple more potential issues found during static analysis. --- Source/TableDocument.m | 2 +- Source/TableDump.m | 2 +- Source/TablesList.m | 7 ++++--- 3 files changed, 6 insertions(+), 5 deletions(-) (limited to 'Source') diff --git a/Source/TableDocument.m b/Source/TableDocument.m index 36ad7be8..2337961f 100644 --- a/Source/TableDocument.m +++ b/Source/TableDocument.m @@ -254,7 +254,7 @@ NSDictionary *connection = nil; NSDictionary *spf = nil; - NSInteger connectionType; + NSInteger connectionType = -1; // Inform about the data source in the window title bar [tableWindow setTitle:[self displaySPName]]; diff --git a/Source/TableDump.m b/Source/TableDump.m index adc28259..90b753a6 100644 --- a/Source/TableDump.m +++ b/Source/TableDump.m @@ -2534,7 +2534,7 @@ NSMutableString *infoString = [NSMutableString string]; NSMutableString *errors = [NSMutableString string]; NSStringEncoding connectionEncoding = [mySQLConnection encoding]; - NSMutableString *csvLineEnd; + NSMutableString *csvLineEnd = [NSMutableString string]; NSDictionary *tableDetails = nil; NSMutableArray *tableColumnNumericStatus; diff --git a/Source/TablesList.m b/Source/TablesList.m index fdd1b029..1b83cfed 100644 --- a/Source/TablesList.m +++ b/Source/TablesList.m @@ -316,7 +316,7 @@ NSIndexSet *indexes = [tablesListView selectedRowIndexes]; - NSString *tblTypes; + NSString *tblTypes = @""; NSUInteger currentIndex = [indexes lastIndex]; if ([tablesListView numberOfSelectedRows] == 1) { @@ -377,7 +377,7 @@ */ - (IBAction)copyTable:(id)sender { - NSString *tableType; + NSString *tableType = @""; if ([tablesListView numberOfSelectedRows] != 1) return; if (![tableSourceInstance saveRowOnDeselect] || ![tableContentInstance saveRowOnDeselect]) return; @@ -2248,7 +2248,8 @@ // procedures and functions can only be renamed if one creates a new one and deletes the old one // first get the create syntax - NSString *stringTableType; + NSString *stringTableType = @""; + switch (tableType){ case SP_TABLETYPE_PROC: stringTableType = @"PROCEDURE"; break; case SP_TABLETYPE_FUNC: stringTableType = @"FUNCTION"; break; -- cgit v1.2.3