Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed some compiler warnings

  • Loading branch information...
commit 1a53946b6199a071218b592b994e7fdc876d3e1c 1 parent f87a37f
Ole Zorn authored
Showing with 26 additions and 16 deletions.
  1. +4 −4 Classes/KKKeychain.m
  2. +22 −12 Classes/unzip.c
View
8 Classes/KKKeychain.m
@@ -57,16 +57,16 @@ + (BOOL)setString:(NSString*)string forKey:(NSString*)key
[addDict setObject:data forKey:(id)kSecValueData];
res = SecItemAdd((CFDictionaryRef)addDict, NULL);
- NSAssert1(res == errSecSuccess, @"Recieved %d from SecItemAdd!", res);
+ NSAssert1(res == errSecSuccess, @"Recieved %ld from SecItemAdd!", res);
}
} else if (res == errSecSuccess) {
// Modify an existing one
// Actually pull it now of the keychain at this point.
NSDictionary *attributeDict = [NSDictionary dictionaryWithObject:data forKey:(id)kSecValueData];
res = SecItemUpdate((CFDictionaryRef)existsQueryDictionary, (CFDictionaryRef)attributeDict);
- NSAssert1(res == errSecSuccess, @"SecItemUpdated returned %d!", res);
+ NSAssert1(res == errSecSuccess, @"SecItemUpdated returned %ld!", res);
} else {
- NSAssert1(NO, @"Received %d from SecItemCopyMatching!", res);
+ NSAssert1(NO, @"Received %ld from SecItemCopyMatching!", res);
}
return YES;
}
@@ -92,7 +92,7 @@ + (NSString*)getStringForKey:(NSString*)key
NSString *string = [[[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding] autorelease];
return string;
} else {
- NSAssert1(res == errSecItemNotFound, @"SecItemCopyMatching returned %d!", res);
+ NSAssert1(res == errSecItemNotFound, @"SecItemCopyMatching returned %ld!", res);
}
return nil;
View
34 Classes/unzip.c
@@ -607,11 +607,14 @@ local int unzlocal_GetCurrentFileInfoInternal (file,
/* we check the magic */
- if (err==UNZ_OK)
- if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uMagic) != UNZ_OK)
+ if (err==UNZ_OK) {
+ if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uMagic) != UNZ_OK) {
err=UNZ_ERRNO;
- else if (uMagic!=0x02014b50)
+ }
+ else if (uMagic!=0x02014b50) {
err=UNZ_BADZIPFILE;
+ }
+ }
if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.version) != UNZ_OK)
err=UNZ_ERRNO;
@@ -687,11 +690,13 @@ local int unzlocal_GetCurrentFileInfoInternal (file,
else
uSizeRead = extraFieldBufferSize;
- if (lSeek!=0)
- if (ZSEEK(s->z_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0)
+ if (lSeek!=0) {
+ if (ZSEEK(s->z_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0) {
lSeek=0;
- else
+ } else {
err=UNZ_ERRNO;
+ }
+ }
if ((file_info.size_file_extra>0) && (extraFieldBufferSize>0))
if (ZREAD(s->z_filefunc, s->filestream,extraField,uSizeRead)!=uSizeRead)
err=UNZ_ERRNO;
@@ -712,11 +717,13 @@ local int unzlocal_GetCurrentFileInfoInternal (file,
else
uSizeRead = commentBufferSize;
- if (lSeek!=0)
- if (ZSEEK(s->z_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0)
+ if (lSeek!=0) {
+ if (ZSEEK(s->z_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0) {
lSeek=0;
- else
+ } else {
err=UNZ_ERRNO;
+ }
+ }
if ((file_info.size_file_comment>0) && (commentBufferSize>0))
if (ZREAD(s->z_filefunc, s->filestream,szComment,uSizeRead)!=uSizeRead)
err=UNZ_ERRNO;
@@ -976,11 +983,14 @@ local int unzlocal_CheckCurrentFileCoherencyHeader (s,piSizeVar,
return UNZ_ERRNO;
- if (err==UNZ_OK)
- if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uMagic) != UNZ_OK)
+ if (err==UNZ_OK) {
+ if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uMagic) != UNZ_OK) {
err=UNZ_ERRNO;
- else if (uMagic!=0x04034b50)
+ }
+ else if (uMagic!=0x04034b50) {
err=UNZ_BADZIPFILE;
+ }
+ }
if (unzlocal_getShort(&s->z_filefunc, s->filestream,&uData) != UNZ_OK)
err=UNZ_ERRNO;
Please sign in to comment.
Something went wrong with that request. Please try again.