aboutsummaryrefslogtreecommitdiffstats
path: root/Frameworks/PostgresKit/Source
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2012-10-20 20:02:02 +0000
committerstuconnolly <stuart02@gmail.com>2012-10-20 20:02:02 +0000
commit1e2c59c759de7cc0293d3d161b0292ed28a166ce (patch)
tree94f42be104e2d8e15e30117e0345fafac2124422 /Frameworks/PostgresKit/Source
parent62b310ab2fa911c8b9e1d8b8f71d9186e938b347 (diff)
downloadsequelpro-1e2c59c759de7cc0293d3d161b0292ed28a166ce.tar.gz
sequelpro-1e2c59c759de7cc0293d3d161b0292ed28a166ce.tar.bz2
sequelpro-1e2c59c759de7cc0293d3d161b0292ed28a166ce.zip
Fix static analysis and release build warnings.
Diffstat (limited to 'Frameworks/PostgresKit/Source')
-rw-r--r--Frameworks/PostgresKit/Source/PGPostgresTypeBinaryHandler.m2
-rw-r--r--Frameworks/PostgresKit/Source/PGPostgresTypeNumberHandler.m18
2 files changed, 12 insertions, 8 deletions
diff --git a/Frameworks/PostgresKit/Source/PGPostgresTypeBinaryHandler.m b/Frameworks/PostgresKit/Source/PGPostgresTypeBinaryHandler.m
index 6c40ca14..aab09b54 100644
--- a/Frameworks/PostgresKit/Source/PGPostgresTypeBinaryHandler.m
+++ b/Frameworks/PostgresKit/Source/PGPostgresTypeBinaryHandler.m
@@ -67,7 +67,7 @@ static PGPostgresOid PGPostgresTypeBinaryTypes[] =
if (!_result || !_type) return [NSNull null];
- if (!PQgetf(_result, _row, PGPostgresResultValueByteA, _column)) return [NSNull null];
+ if (!PQgetf(_result, (int)_row, PGPostgresResultValueByteA, (int)_column, &data)) return [NSNull null];
if (!data.data || !data.len) return [NSData data];
diff --git a/Frameworks/PostgresKit/Source/PGPostgresTypeNumberHandler.m b/Frameworks/PostgresKit/Source/PGPostgresTypeNumberHandler.m
index 106fce21..f3eddb69 100644
--- a/Frameworks/PostgresKit/Source/PGPostgresTypeNumberHandler.m
+++ b/Frameworks/PostgresKit/Source/PGPostgresTypeNumberHandler.m
@@ -113,15 +113,15 @@ static PGPostgresOid PGPostgresTypeNumberTypes[] =
switch (length)
{
case 2:
- if (!PQgetf(_result, _row, PGPostgresResultValueInt2, &int2)) return [NSNull null];
+ if (!PQgetf(_result, (int)_row, PGPostgresResultValueInt2, (int)_column, &int2)) return [NSNull null];
return [NSNumber numberWithShort:int2];
case 4:
- if (!PQgetf(_result, _row, PGPostgresResultValueInt4, &int4)) return [NSNull null];
+ if (!PQgetf(_result, (int)_row, PGPostgresResultValueInt4, (int)_column, &int4)) return [NSNull null];
return [NSNumber numberWithInteger:int4];
case 8:
- if (!PQgetf(_result, _row, PGPostgresResultValueInt8, &int8)) return [NSNull null];
+ if (!PQgetf(_result, (int)_row, PGPostgresResultValueInt8, (int)_column, &int8)) return [NSNull null];
return [NSNumber numberWithLongLong:int8];
}
@@ -149,11 +149,11 @@ static PGPostgresOid PGPostgresTypeNumberTypes[] =
switch (length)
{
case 4:
- if (!PQgetf(_result, _row, PGPostgresResultValueFloat4, &float4)) return [NSNull null];
+ if (!PQgetf(_result, (int)_row, PGPostgresResultValueFloat4, (int)_column, &float4)) return [NSNull null];
return [NSNumber numberWithFloat:float4];
case 8:
- if (!PQgetf(_result, _row, PGPostgresResultValueFloat8, &float8)) return [NSNull null];
+ if (!PQgetf(_result, (int)_row, PGPostgresResultValueFloat8, (int)_column, &float8)) return [NSNull null];
return [NSNumber numberWithDouble:float8];
}
@@ -173,7 +173,7 @@ static PGPostgresOid PGPostgresTypeNumberTypes[] =
{
PGbool b;
- if (!PQgetf(_result, _row, PGPostgresResultValueBool, &b)) return [NSNull null];
+ if (!PQgetf(_result, (int)_row, PGPostgresResultValueBool, (int)_column, &b)) return [NSNull null];
return [NSNumber numberWithInt:b];
}
@@ -196,7 +196,11 @@ static PGPostgresOid PGPostgresTypeNumberTypes[] =
double value = [stringValue doubleValue];
- if (value == HUGE_VAL || value == -HUGE_VAL) return [NSNull null];
+ if (value == HUGE_VAL || value == -HUGE_VAL) {
+ [stringValue release];
+
+ return [NSNull null];
+ }
[stringValue release];