Skip to content

Commit

Permalink
Cleaning up warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
slembcke committed Oct 22, 2014
1 parent 69910e4 commit 38b688c
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 24 deletions.
4 changes: 2 additions & 2 deletions CCRendererGLSupport.m
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,8 @@ -(instancetype)initWithTexture:(CCTexture *)texture depthStencilFormat:(GLuint)d
// associate texture with FBO
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, texture.name, 0);

GLuint width = texture.pixelWidth;
GLuint height = texture.pixelHeight;
GLuint width = (GLuint)texture.pixelWidth;
GLuint height = (GLuint)texture.pixelHeight;

#if __CC_PLATFORM_ANDROID

Expand Down
4 changes: 2 additions & 2 deletions UnitTests/CCPackageDownloadTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ - (void)startLoading
{
byteRangeStart = [self parseRangeHeaderValue:self.request.allHTTPHeaderFields[@"Range"]];
headers[@"Accept-Ranges"] = @"bytes";
headers[@"Content-Range"] = [NSString stringWithFormat:@"bytes %u-%u/%u", byteRangeStart, fileSize - 1, fileSize];
headers[@"Content-Range"] = [NSString stringWithFormat:@"bytes %u-%u/%u", (unsigned int)byteRangeStart, (unsigned int)fileSize - 1, (unsigned int)fileSize];
}

NSData *data = [[NSData dataWithContentsOfFile:pathToPackage] subdataWithRange:NSMakeRange(byteRangeStart, fileSize - byteRangeStart)];
Expand All @@ -85,7 +85,7 @@ - (void)startLoading
NSHTTPURLResponse *response;
if (pathToPackage)
{
headers[@"Content-Length"] = [NSString stringWithFormat:@"%u", [data length]];
headers[@"Content-Length"] = [NSString stringWithFormat:@"%u", (unsigned int)[data length]];
response = [[NSHTTPURLResponse alloc] initWithURL:self.request.URL
statusCode:200
HTTPVersion:@"HTTP/1.1"
Expand Down
14 changes: 7 additions & 7 deletions cocos2d-tests.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
B7E2605817E7D278007067F0 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B7E2605717E7D278007067F0 /* Foundation.framework */; };
B7E2605A17E7D278007067F0 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B7E2605917E7D278007067F0 /* CoreGraphics.framework */; };
B7E2605C17E7D278007067F0 /* CoreText.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B7E2605B17E7D278007067F0 /* CoreText.framework */; };
B7E2605E17E7D278007067F0 /* GameKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B7E2605D17E7D278007067F0 /* GameKit.framework */; };
B7E2620017E7D321007067F0 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = B7E261FF17E7D321007067F0 /* AppDelegate.m */; };
B7E2620E17E7D34D007067F0 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = B7E2620217E7D34D007067F0 /* [email protected] */; };
B7E2620F17E7D34D007067F0 /* Default-Landscape~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = B7E2620317E7D34D007067F0 /* Default-Landscape~ipad.png */; };
Expand Down Expand Up @@ -150,7 +149,6 @@
D3763C0419E73188006C050D /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B7E2605717E7D278007067F0 /* Foundation.framework */; };
D3763C0519E73188006C050D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B7E2605917E7D278007067F0 /* CoreGraphics.framework */; };
D3763C0619E73188006C050D /* CoreText.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B7E2605B17E7D278007067F0 /* CoreText.framework */; };
D3763C0719E73188006C050D /* GameKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B7E2605D17E7D278007067F0 /* GameKit.framework */; };
D3763D3819E734C5006C050D /* MainMenu.m in Sources */ = {isa = PBXBuildFile; fileRef = B7E2622017E7D3B2007067F0 /* MainMenu.m */; };
D3763D3919E734C5006C050D /* TestBase.m in Sources */ = {isa = PBXBuildFile; fileRef = B71B087B17EA5B490082EBC0 /* TestBase.m */; };
D3763D3A19E734C5006C050D /* CCCacheTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 0E28FE19197FCE4500F78989 /* CCCacheTest.m */; };
Expand Down Expand Up @@ -360,7 +358,6 @@
B7E2605717E7D278007067F0 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
B7E2605917E7D278007067F0 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
B7E2605B17E7D278007067F0 /* CoreText.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreText.framework; path = System/Library/Frameworks/CoreText.framework; sourceTree = SDKROOT; };
B7E2605D17E7D278007067F0 /* GameKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GameKit.framework; path = System/Library/Frameworks/GameKit.framework; sourceTree = SDKROOT; };
B7E261FE17E7D321007067F0 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = "cocos2d-ui-tests/ios/AppDelegate.h"; sourceTree = SOURCE_ROOT; };
B7E261FF17E7D321007067F0 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = "cocos2d-ui-tests/ios/AppDelegate.m"; sourceTree = SOURCE_ROOT; };
B7E2620217E7D34D007067F0 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -513,7 +510,6 @@
B7E2605817E7D278007067F0 /* Foundation.framework in Frameworks */,
B7E2605A17E7D278007067F0 /* CoreGraphics.framework in Frameworks */,
B7E2605C17E7D278007067F0 /* CoreText.framework in Frameworks */,
B7E2605E17E7D278007067F0 /* GameKit.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -532,7 +528,6 @@
D3763C0419E73188006C050D /* Foundation.framework in Frameworks */,
D3763C0519E73188006C050D /* CoreGraphics.framework in Frameworks */,
D3763C0619E73188006C050D /* CoreText.framework in Frameworks */,
D3763C0719E73188006C050D /* GameKit.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -665,7 +660,6 @@
B7E2605717E7D278007067F0 /* Foundation.framework */,
B7E2605917E7D278007067F0 /* CoreGraphics.framework */,
B7E2605B17E7D278007067F0 /* CoreText.framework */,
B7E2605D17E7D278007067F0 /* GameKit.framework */,
75556A03185636F100ED1B0F /* XCTest.framework */,
);
name = Frameworks;
Expand Down Expand Up @@ -947,6 +941,11 @@
};
B7E2604717E7D278007067F0 = {
DevelopmentTeam = 96LKF67VJA;
SystemCapabilities = {
com.apple.GameCenter = {
enabled = 0;
};
};
};
};
};
Expand Down Expand Up @@ -1573,9 +1572,10 @@
CLANG_ENABLE_OBJC_ARC = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = YES;
COPY_PHASE_STRIP = NO;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "cocos2d-ui-tests/ios/Prefix.pch";
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
INFOPLIST_FILE = "cocos2d-ui-tests/ios/Resources/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 5.1.1;
MTL_HEADER_SEARCH_PATHS = "/Users/slembcke/Development/cocos2d-iphone/cocos2d";
Expand Down
4 changes: 2 additions & 2 deletions cocos2d-ui-tests/tests/CCPackageTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -189,12 +189,12 @@ - (void)packageUnzippingFailed:(CCPackage *)package error:(NSError *)error

- (void)packageDownloadProgress:(CCPackage *)package downloadedBytes:(NSUInteger)downloadedBytes totalBytes:(NSUInteger)totalBytes
{
NSLog(@"downloading... %u / %u", downloadedBytes, totalBytes);
NSLog(@"downloading... %u / %u", (unsigned int)downloadedBytes, (unsigned int)totalBytes);
}

- (void)packageUnzippingProgress:(CCPackage *)package unzippedBytes:(NSUInteger)unzippedBytes totalBytes:(NSUInteger)totalBytes
{
NSLog(@"unzipping... %u / %u", unzippedBytes, totalBytes);
NSLog(@"unzipping... %u / %u", (unsigned int)unzippedBytes, (unsigned int)totalBytes);
}

@end
10 changes: 2 additions & 8 deletions cocos2d.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1938,7 +1938,6 @@
isa = PBXGroup;
children = (
83409E3219D5B791004B7EB9 /* SSZipArchiveExampleApp.app */,
83409E3419D5B791004B7EB9 /* SSZipArchiveTests.xctest */,
83409E3619D5B791004B7EB9 /* libSSZipArchive.a */,
7A40378319E36EFF007B6E8F /* libSSZipArchiveAndroid.a */,
7A59498219E38C8300F65F90 /* libSSZipArchiveMac.a */,
Expand Down Expand Up @@ -2978,13 +2977,6 @@
remoteRef = 7A40377A19E36EFF007B6E8F /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
83409E3219D5B791004B7EB9 /* SSZipArchiveExampleApp.app */ = {
isa = PBXReferenceProxy;
fileType = wrapper.application;
path = SSZipArchiveExampleApp.app;
remoteRef = 83409E3119D5B791004B7EB9 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
7A40378319E36EFF007B6E8F /* libSSZipArchiveAndroid.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
Expand Down Expand Up @@ -3575,6 +3567,7 @@
DEBUG,
"COCOS2D_DEBUG=1",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_THUMB_SUPPORT = NO;
GCC_TREAT_WARNINGS_AS_ERRORS = NO;
GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES;
Expand Down Expand Up @@ -3610,6 +3603,7 @@
CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES;
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_THUMB_SUPPORT = NO;
GCC_TREAT_WARNINGS_AS_ERRORS = NO;
GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES;
Expand Down
6 changes: 3 additions & 3 deletions cocos2d/CCPackageDownload.m
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ - (NSString *)sha1:(NSString *)str
{
const char *cStr = [str UTF8String];
unsigned char result[CC_SHA1_DIGEST_LENGTH];
CC_SHA1(cStr, strlen(cStr), result);
CC_SHA1(cStr, (CC_LONG)strlen(cStr), result);
NSString *hash = [NSString stringWithFormat:
@"%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
result[0], result[1], result[2], result[3], result[4],
Expand Down Expand Up @@ -263,7 +263,7 @@ - (NSURLRequest *)createRequest

if (_fileSize > 0)
{
NSString *requestRange = [NSString stringWithFormat:@"bytes=%d-", _fileSize];
NSString *requestRange = [NSString stringWithFormat:@"bytes=%d-", (unsigned int)_fileSize];
[result setValue:requestRange forHTTPHeaderField:@"Range"];
}

Expand Down Expand Up @@ -408,7 +408,7 @@ - (void)forwardResponseErrorToDelegate:(NSHTTPURLResponse *)httpResponse
NSError *error = [NSError errorWithDomain:@"Cocos2d"
code:PACKAGE_ERROR_DOWNLOAD_SERVER_RESPONSE_NOT_OK
userInfo:@{
NSLocalizedDescriptionKey : [NSString stringWithFormat:@"Error: The host respondeded with status code %d.", [httpResponse statusCode]],
NSLocalizedDescriptionKey : [NSString stringWithFormat:@"Error: The host respondeded with status code %d.", (unsigned int)[httpResponse statusCode]],
@"HTTPResponse" : httpResponse
}];

Expand Down

0 comments on commit 38b688c

Please sign in to comment.