aboutsummaryrefslogtreecommitdiffstats
path: root/Frameworks/PostgresKit/Source/FLXPostgresError.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2012-09-09 12:25:03 +0000
committerstuconnolly <stuart02@gmail.com>2012-09-09 12:25:03 +0000
commit5419378fa8c8eb7ae679dd1a34edcaeaf0a430ea (patch)
tree3446b4acdbb6388dce3baa3341cf916e78ff57e5 /Frameworks/PostgresKit/Source/FLXPostgresError.m
parentbc39e252aed0269716525a39c5f2e034f1d56c19 (diff)
downloadsequelpro-5419378fa8c8eb7ae679dd1a34edcaeaf0a430ea.tar.gz
sequelpro-5419378fa8c8eb7ae679dd1a34edcaeaf0a430ea.tar.bz2
sequelpro-5419378fa8c8eb7ae679dd1a34edcaeaf0a430ea.zip
Fix static analysis warnings.
Diffstat (limited to 'Frameworks/PostgresKit/Source/FLXPostgresError.m')
-rw-r--r--Frameworks/PostgresKit/Source/FLXPostgresError.m9
1 files changed, 2 insertions, 7 deletions
diff --git a/Frameworks/PostgresKit/Source/FLXPostgresError.m b/Frameworks/PostgresKit/Source/FLXPostgresError.m
index 927100f8..31024a92 100644
--- a/Frameworks/PostgresKit/Source/FLXPostgresError.m
+++ b/Frameworks/PostgresKit/Source/FLXPostgresError.m
@@ -97,12 +97,7 @@
_errorPrimaryMessage = [self _extractErrorField:PG_DIAG_MESSAGE_PRIMARY fromResult:result];
_errorDetailMessage = [self _extractErrorField:PG_DIAG_MESSAGE_DETAIL fromResult:result];
_errorMessageHint = [self _extractErrorField:PG_DIAG_MESSAGE_HINT fromResult:result];
-
- NSString *statementPosition = [self _extractErrorField:PG_DIAG_STATEMENT_POSITION fromResult:result];
-
- _errorStatementPosition = [statementPosition integerValue];
-
- [statementPosition release];
+ _errorStatementPosition = [[self _extractErrorField:PG_DIAG_STATEMENT_POSITION fromResult:result] integerValue];
}
/**
@@ -115,7 +110,7 @@
*/
- (NSString *)_extractErrorField:(int)field fromResult:(const PGresult *)result
{
- return [[NSString alloc] initWithUTF8String:PQresultErrorField(result, field)];
+ return [[[NSString alloc] initWithUTF8String:PQresultErrorField(result, field)] autorelease];
}
#pragma mark -