Skip to content

Commit 38b688c

Browse files
committed
Cleaning up warnings.
1 parent 69910e4 commit 38b688c

File tree

6 files changed

+18
-24
lines changed

6 files changed

+18
-24
lines changed

CCRendererGLSupport.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,8 @@ -(instancetype)initWithTexture:(CCTexture *)texture depthStencilFormat:(GLuint)d
288288
// associate texture with FBO
289289
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, texture.name, 0);
290290

291-
GLuint width = texture.pixelWidth;
292-
GLuint height = texture.pixelHeight;
291+
GLuint width = (GLuint)texture.pixelWidth;
292+
GLuint height = (GLuint)texture.pixelHeight;
293293

294294
#if __CC_PLATFORM_ANDROID
295295

UnitTests/CCPackageDownloadTests.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ - (void)startLoading
7575
{
7676
byteRangeStart = [self parseRangeHeaderValue:self.request.allHTTPHeaderFields[@"Range"]];
7777
headers[@"Accept-Ranges"] = @"bytes";
78-
headers[@"Content-Range"] = [NSString stringWithFormat:@"bytes %u-%u/%u", byteRangeStart, fileSize - 1, fileSize];
78+
headers[@"Content-Range"] = [NSString stringWithFormat:@"bytes %u-%u/%u", (unsigned int)byteRangeStart, (unsigned int)fileSize - 1, (unsigned int)fileSize];
7979
}
8080

8181
NSData *data = [[NSData dataWithContentsOfFile:pathToPackage] subdataWithRange:NSMakeRange(byteRangeStart, fileSize - byteRangeStart)];
@@ -85,7 +85,7 @@ - (void)startLoading
8585
NSHTTPURLResponse *response;
8686
if (pathToPackage)
8787
{
88-
headers[@"Content-Length"] = [NSString stringWithFormat:@"%u", [data length]];
88+
headers[@"Content-Length"] = [NSString stringWithFormat:@"%u", (unsigned int)[data length]];
8989
response = [[NSHTTPURLResponse alloc] initWithURL:self.request.URL
9090
statusCode:200
9191
HTTPVersion:@"HTTP/1.1"

cocos2d-tests.xcodeproj/project.pbxproj

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
B7E2605817E7D278007067F0 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B7E2605717E7D278007067F0 /* Foundation.framework */; };
4848
B7E2605A17E7D278007067F0 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B7E2605917E7D278007067F0 /* CoreGraphics.framework */; };
4949
B7E2605C17E7D278007067F0 /* CoreText.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B7E2605B17E7D278007067F0 /* CoreText.framework */; };
50-
B7E2605E17E7D278007067F0 /* GameKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B7E2605D17E7D278007067F0 /* GameKit.framework */; };
5150
B7E2620017E7D321007067F0 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = B7E261FF17E7D321007067F0 /* AppDelegate.m */; };
5251
B7E2620E17E7D34D007067F0 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = B7E2620217E7D34D007067F0 /* [email protected] */; };
5352
B7E2620F17E7D34D007067F0 /* Default-Landscape~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = B7E2620317E7D34D007067F0 /* Default-Landscape~ipad.png */; };
@@ -150,7 +149,6 @@
150149
D3763C0419E73188006C050D /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B7E2605717E7D278007067F0 /* Foundation.framework */; };
151150
D3763C0519E73188006C050D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B7E2605917E7D278007067F0 /* CoreGraphics.framework */; };
152151
D3763C0619E73188006C050D /* CoreText.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B7E2605B17E7D278007067F0 /* CoreText.framework */; };
153-
D3763C0719E73188006C050D /* GameKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B7E2605D17E7D278007067F0 /* GameKit.framework */; };
154152
D3763D3819E734C5006C050D /* MainMenu.m in Sources */ = {isa = PBXBuildFile; fileRef = B7E2622017E7D3B2007067F0 /* MainMenu.m */; };
155153
D3763D3919E734C5006C050D /* TestBase.m in Sources */ = {isa = PBXBuildFile; fileRef = B71B087B17EA5B490082EBC0 /* TestBase.m */; };
156154
D3763D3A19E734C5006C050D /* CCCacheTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 0E28FE19197FCE4500F78989 /* CCCacheTest.m */; };
@@ -360,7 +358,6 @@
360358
B7E2605717E7D278007067F0 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
361359
B7E2605917E7D278007067F0 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
362360
B7E2605B17E7D278007067F0 /* CoreText.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreText.framework; path = System/Library/Frameworks/CoreText.framework; sourceTree = SDKROOT; };
363-
B7E2605D17E7D278007067F0 /* GameKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GameKit.framework; path = System/Library/Frameworks/GameKit.framework; sourceTree = SDKROOT; };
364361
B7E261FE17E7D321007067F0 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = "cocos2d-ui-tests/ios/AppDelegate.h"; sourceTree = SOURCE_ROOT; };
365362
B7E261FF17E7D321007067F0 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = "cocos2d-ui-tests/ios/AppDelegate.m"; sourceTree = SOURCE_ROOT; };
366363
B7E2620217E7D34D007067F0 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
@@ -513,7 +510,6 @@
513510
B7E2605817E7D278007067F0 /* Foundation.framework in Frameworks */,
514511
B7E2605A17E7D278007067F0 /* CoreGraphics.framework in Frameworks */,
515512
B7E2605C17E7D278007067F0 /* CoreText.framework in Frameworks */,
516-
B7E2605E17E7D278007067F0 /* GameKit.framework in Frameworks */,
517513
);
518514
runOnlyForDeploymentPostprocessing = 0;
519515
};
@@ -532,7 +528,6 @@
532528
D3763C0419E73188006C050D /* Foundation.framework in Frameworks */,
533529
D3763C0519E73188006C050D /* CoreGraphics.framework in Frameworks */,
534530
D3763C0619E73188006C050D /* CoreText.framework in Frameworks */,
535-
D3763C0719E73188006C050D /* GameKit.framework in Frameworks */,
536531
);
537532
runOnlyForDeploymentPostprocessing = 0;
538533
};
@@ -665,7 +660,6 @@
665660
B7E2605717E7D278007067F0 /* Foundation.framework */,
666661
B7E2605917E7D278007067F0 /* CoreGraphics.framework */,
667662
B7E2605B17E7D278007067F0 /* CoreText.framework */,
668-
B7E2605D17E7D278007067F0 /* GameKit.framework */,
669663
75556A03185636F100ED1B0F /* XCTest.framework */,
670664
);
671665
name = Frameworks;
@@ -947,6 +941,11 @@
947941
};
948942
B7E2604717E7D278007067F0 = {
949943
DevelopmentTeam = 96LKF67VJA;
944+
SystemCapabilities = {
945+
com.apple.GameCenter = {
946+
enabled = 0;
947+
};
948+
};
950949
};
951950
};
952951
};
@@ -1573,9 +1572,10 @@
15731572
CLANG_ENABLE_OBJC_ARC = YES;
15741573
CODE_SIGN_IDENTITY = "iPhone Developer";
15751574
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
1576-
COPY_PHASE_STRIP = YES;
1575+
COPY_PHASE_STRIP = NO;
15771576
GCC_PRECOMPILE_PREFIX_HEADER = YES;
15781577
GCC_PREFIX_HEADER = "cocos2d-ui-tests/ios/Prefix.pch";
1578+
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
15791579
INFOPLIST_FILE = "cocos2d-ui-tests/ios/Resources/Info.plist";
15801580
IPHONEOS_DEPLOYMENT_TARGET = 5.1.1;
15811581
MTL_HEADER_SEARCH_PATHS = "/Users/slembcke/Development/cocos2d-iphone/cocos2d";

cocos2d-ui-tests/tests/CCPackageTest.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,12 +189,12 @@ - (void)packageUnzippingFailed:(CCPackage *)package error:(NSError *)error
189189

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

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

200200
@end

cocos2d.xcodeproj/project.pbxproj

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1938,7 +1938,6 @@
19381938
isa = PBXGroup;
19391939
children = (
19401940
83409E3219D5B791004B7EB9 /* SSZipArchiveExampleApp.app */,
1941-
83409E3419D5B791004B7EB9 /* SSZipArchiveTests.xctest */,
19421941
83409E3619D5B791004B7EB9 /* libSSZipArchive.a */,
19431942
7A40378319E36EFF007B6E8F /* libSSZipArchiveAndroid.a */,
19441943
7A59498219E38C8300F65F90 /* libSSZipArchiveMac.a */,
@@ -2978,13 +2977,6 @@
29782977
remoteRef = 7A40377A19E36EFF007B6E8F /* PBXContainerItemProxy */;
29792978
sourceTree = BUILT_PRODUCTS_DIR;
29802979
};
2981-
83409E3219D5B791004B7EB9 /* SSZipArchiveExampleApp.app */ = {
2982-
isa = PBXReferenceProxy;
2983-
fileType = wrapper.application;
2984-
path = SSZipArchiveExampleApp.app;
2985-
remoteRef = 83409E3119D5B791004B7EB9 /* PBXContainerItemProxy */;
2986-
sourceTree = BUILT_PRODUCTS_DIR;
2987-
};
29882980
7A40378319E36EFF007B6E8F /* libSSZipArchiveAndroid.a */ = {
29892981
isa = PBXReferenceProxy;
29902982
fileType = archive.ar;
@@ -3575,6 +3567,7 @@
35753567
DEBUG,
35763568
"COCOS2D_DEBUG=1",
35773569
);
3570+
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
35783571
GCC_THUMB_SUPPORT = NO;
35793572
GCC_TREAT_WARNINGS_AS_ERRORS = NO;
35803573
GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES;
@@ -3610,6 +3603,7 @@
36103603
CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES;
36113604
COPY_PHASE_STRIP = YES;
36123605
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
3606+
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
36133607
GCC_THUMB_SUPPORT = NO;
36143608
GCC_TREAT_WARNINGS_AS_ERRORS = NO;
36153609
GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES;

cocos2d/CCPackageDownload.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ - (NSString *)sha1:(NSString *)str
9494
{
9595
const char *cStr = [str UTF8String];
9696
unsigned char result[CC_SHA1_DIGEST_LENGTH];
97-
CC_SHA1(cStr, strlen(cStr), result);
97+
CC_SHA1(cStr, (CC_LONG)strlen(cStr), result);
9898
NSString *hash = [NSString stringWithFormat:
9999
@"%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
100100
result[0], result[1], result[2], result[3], result[4],
@@ -263,7 +263,7 @@ - (NSURLRequest *)createRequest
263263

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

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

0 commit comments

Comments
 (0)