aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPFileHandle.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2011-03-19 15:05:23 +0000
committerstuconnolly <stuart02@gmail.com>2011-03-19 15:05:23 +0000
commit6d3f21336846d7745e795202c99390832c4220c8 (patch)
tree6195dafeeb1871afc5e41f6f17a917dc8047d44a /Source/SPFileHandle.m
parentb2a0af91eae18b6490ddeafd2708d256b0d53cb3 (diff)
downloadsequelpro-6d3f21336846d7745e795202c99390832c4220c8.tar.gz
sequelpro-6d3f21336846d7745e795202c99390832c4220c8.tar.bz2
sequelpro-6d3f21336846d7745e795202c99390832c4220c8.zip
Bring outline view branch up to date with trunk (r3235:r3245), which should resolve all warnings.
Diffstat (limited to 'Source/SPFileHandle.m')
-rw-r--r--Source/SPFileHandle.m14
1 files changed, 8 insertions, 6 deletions
diff --git a/Source/SPFileHandle.m b/Source/SPFileHandle.m
index ff583ddc..3701fc8c 100644
--- a/Source/SPFileHandle.m
+++ b/Source/SPFileHandle.m
@@ -55,7 +55,7 @@
*/
- (id)initWithFile:(void *)theFile fromPath:(const char *)path mode:(int)mode
{
- if (self = [super init]) {
+ if ((self = [super init])) {
dataWritten = NO;
allDataWritten = YES;
fileIsClosed = NO;
@@ -215,10 +215,10 @@
if (useCompression) {
if (compressionFormat == SPGzipCompression) {
- theDataLength = gzread(wrappedFile, theData, length);
+ theDataLength = gzread(wrappedFile, theData, (unsigned)length);
}
else if (compressionFormat == SPBzip2Compression) {
- theDataLength = BZ2_bzread(wrappedFile, theData, length);
+ theDataLength = BZ2_bzread(wrappedFile, theData, (int)length);
}
}
else {
@@ -426,10 +426,12 @@
switch (compressionFormat)
{
case SPGzipCompression:
- bufferLengthWrittenOut = gzwrite(wrappedFile, [dataToBeWritten bytes], [dataToBeWritten length]);
+ bufferLengthWrittenOut = gzwrite(wrappedFile, [dataToBeWritten bytes], (unsigned)[dataToBeWritten length]);
break;
case SPBzip2Compression:
- bufferLengthWrittenOut = BZ2_bzwrite(wrappedFile, [dataToBeWritten bytes], [dataToBeWritten length]);
+ bufferLengthWrittenOut = BZ2_bzwrite(wrappedFile, (void *)[dataToBeWritten bytes], (int)[dataToBeWritten length]);
+ break;
+ default:
break;
}
}
@@ -439,7 +441,7 @@
// Restore data to the buffer if it wasn't written out
pthread_mutex_lock(&bufferLock);
- if (bufferLengthWrittenOut < [dataToBeWritten length]) {
+ if (bufferLengthWrittenOut < (NSInteger)[dataToBeWritten length]) {
if ([buffer length]) {
long dataLengthToRestore = [dataToBeWritten length] - bufferLengthWrittenOut;
[buffer replaceBytesInRange:NSMakeRange(0, 0) withBytes:[[dataToBeWritten subdataWithRange:NSMakeRange(bufferLengthWrittenOut, dataLengthToRestore)] bytes] length:dataLengthToRestore];