| Issue 38: | deprecation as errors for GTMiPhoneUnitTesting in 3.1.2 SDK on snow-leopard (Xcode 3.2.x) | |
| 1 person starred this issue and may be notified of changes. | Back to list |
svn version 254 demonstrates a some issues when compiling for iPhone simulator 3.0 and 3.1.2: the compilation output is listed below. What steps will reproduce the problem? 1. xcode 3.1.2 2. compile for 10.1.6 suggested patch: Index: Foundation/GTMNSObject+KeyValueObserving.m =================================================================== --- Foundation/GTMNSObject+KeyValueObserving.m (revision 254) +++ Foundation/GTMNSObject+KeyValueObserving.m (working copy) @@ -156,6 +156,9 @@ @end +extern int objc_atomicCompareAndSwapGlobalBarrier(void*, void*, void*); + + @implementation GTMKeyValueObservingCenter + (id)defaultCenter { Index: Foundation/GTMLoggerTest.m =================================================================== --- Foundation/GTMLoggerTest.m (revision 254) +++ Foundation/GTMLoggerTest.m (working copy) @@ -295,7 +295,7 @@ [fh logMessage:@"test 4" level:kGTMLoggerLevelAssert]; [fh closeFile]; - NSString *contents = [NSString stringWithContentsOfFile:path_]; + NSString *contents = [NSString stringWithContentsOfFile:path_ encoding:NSUTF8StringEncoding error:nil]; STAssertEqualObjects(@"test 0\ntest 1\ntest 2\ntest 3\ntest 4\n", contents, nil); } @@ -458,7 +458,7 @@ [fh logMessage:@"test 6" level:kGTMLoggerLevelInfo]; [fh closeFile]; - NSString *contents = [NSString stringWithContentsOfFile:path_]; + NSString *contents = [NSString stringWithContentsOfFile:path_ encoding:NSUTF8StringEncoding error:nil]; STAssertNotNil(contents, nil); STAssertEqualObjects(@"test 1\ntest 2\ntest 3\ntest 4\ntest 5\ntest 6\n", contents, nil); } Index: Foundation/GTMNSFileManager+PathTest.m =================================================================== --- Foundation/GTMNSFileManager+PathTest.m (revision 254) +++ Foundation/GTMNSFileManager+PathTest.m (working copy) @@ -141,7 +141,7 @@ } for (size_t j = 0; j < sizeof(testFiles) / sizeof(NSString*); j++) { NSString *testFile = [testDir stringByAppendingPathComponent:testFiles[j]]; - STAssertTrue([@"test" writeToFile:testFile atomically:YES], nil); + STAssertTrue([@"test" writeToFile:testFile atomically:YES encoding:NSUTF8StringEncoding error:nil], nil); } } CompileC build/GTMiPhone.build/Debug-iphonesimulator/GTMiPhoneUnitTesting.build/Objects-normal/i386/GTMNSFileManager+PathTest.o Foundation/GTMNSFileManager+PathTest.m normal i386 objective-c com.apple.compilers.gcc.4_2 cd /Users/mwinter/tmp/google-toolbox-for-mac setenv LANG en_US.US-ASCII setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Developer/usr/bin:/usr/X11/bin" /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -x objective-c -arch i386 -fmessage-length=0 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -mdynamic-no-pic -Werror -Wreturn-type -Wmissing-braces -Wparentheses -Wswitch -Wunused-function -Wunused-label -Wunused-variable -Wunused-value -Wunknown-pragmas -Wshadow -Wnewline-eof -D_GLIBCXX_DEBUG_PEDANTIC -D_GLIBCXX_DEBUG -D_GLIBCPP_CONCEPT_CHECKS -DDEBUG=1 -D__IPHONE_OS_VERSION_MIN_REQUIRED=30000 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk -fvisibility=hidden -mmacosx-version-min=10.5 -gdwarf-2 -iquote /Users/mwinter/tmp/google-toolbox-for-mac/build/GTMiPhone.build/Debug-iphonesimulator/GTMiPhoneUnitTesting.build/GTMiPhoneTest-generated-files.hmap -I/Users/mwinter/tmp/google-toolbox-for-mac/build/GTMiPhone.build/Debug-iphonesimulator/GTMiPhoneUnitTesting.build/GTMiPhoneTest-own-target-headers.hmap -I/Users/mwinter/tmp/google-toolbox-for-mac/build/GTMiPhone.build/Debug-iphonesimulator/GTMiPhoneUnitTesting.build/GTMiPhoneTest-all-target-headers.hmap -iquote /Users/mwinter/tmp/google-toolbox-for-mac/build/GTMiPhone.build/Debug-iphonesimulator/GTMiPhoneUnitTesting.build/GTMiPhoneTest-project-headers.hmap -Wall -Wendif-labels -Winvalid-pch -Wformat=2 -Wmissing-format-attribute -Wwrite-strings -Wstack-protector -Wstrict-aliasing=2 -Wpacked -Wmissing-field-initializers -Wextra -Wno-unused-parameter -Wpointer-arith -Wdisabled-optimization -Wfloat-equal -F/Users/mwinter/tmp/google-toolbox-for-mac/build/Debug-iphonesimulator -I/Users/mwinter/tmp/google-toolbox-for-mac/build/Debug-iphonesimulator/include -I/Users/mwinter/tmp/google-toolbox-for-mac/build/GTMiPhone.build/Debug-iphonesimulator/GTMiPhoneUnitTesting.build/DerivedSources/i386 -I/Users/mwinter/tmp/google-toolbox-for-mac/build/GTMiPhone.build/Debug-iphonesimulator/GTMiPhoneUnitTesting.build/DerivedSources -Wdiv-by-zero -Wbad-function-cast -Wnested-externs -Wold-style-definition -fstack-protector -fstack-protector-all -include /var/folders/h+/h+AKwl6EGhuQQkkrG6PCMk+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/GTM_Prefix-aujutpcpiljyurcgaitldeskopbz/GTM_Prefix.pch -c /Users/mwinter/tmp/google-toolbox-for-mac/Foundation/GTMNSFileManager+PathTest.m -o /Users/mwinter/tmp/google-toolbox-for-mac/build/GTMiPhone.build/Debug-iphonesimulator/GTMiPhoneUnitTesting.build/Objects-normal/i386/GTMNSFileManager+PathTest.o cc1obj: warnings being treated as errors /Users/mwinter/tmp/google-toolbox-for-mac/Foundation/GTMNSFileManager+PathTest.m: In function '-[GTMNSFileManager_PathTest testfilePathsWithExtensionsInDirectory]': /Users/mwinter/tmp/google-toolbox-for-mac/Foundation/GTMNSFileManager+PathTest.m:144: warning: 'writeToFile:atomically:' is deprecated (declared at /Developer/Platforms/iPhoneSimulator.platform cc1obj: warnings being treated as errors /Users/mwinter/tmp/google-toolbox-for-mac/Foundation/GTMLoggerTest.m: In function '-[GTMLoggerTest testFileHandleWriter]': /Users/mwinter/tmp/google-toolbox-for-mac/Foundation/GTMLoggerTest.m:298: warning: 'stringWithContentsOfFile:' is deprecated (declared at /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSString.h:357) /Users/mwinter/tmp/google-toolbox-for-mac/Foundation/GTMLoggerTest.m: In function '-[GTMLoggerTest testFileHandleCreation]': /Users/mwinter/tmp/google-toolbox-for-mac/Foundation/GTMLoggerTest.m:461: warning: 'stringWithContentsOfFile:' is deprecated cc1obj: warnings being treated as errors /Users/mwinter/tmp/google-toolbox-for-mac/Foundation/GTMNSObject+KeyValueObserving.m: In function '+[GTMKeyValueObservingCenter defaultCenter]': /Users/mwinter/tmp/google-toolbox-for-mac/Foundation/GTMNSObject+KeyValueObserving.m:169: warning: implicit declaration of function 'objc_atomicCompareAndSwapGlobalBarrier' /Users/mwinter/tmp/google-toolbox-for-mac/Foundation/GTMNSObject+KeyValueObserving.m:169: warning: nested extern declaration of 'objc_atomicCompareAndSwapGlobalBarrier' |
|
,
Nov 20, 2009
Dave and I have been pretty swamped, but we're working on these and a few other issues with the updated tool chain.
Status: Started
Owner: thomasvl |
|
,
Nov 20, 2009
fyi - I'm landing a cl to put better support for all the iphone sdks in, but Apple has made things a little challenging, the SDKs that ship with Xcode 3.2.x and 3.1.x don't trigger the same warnings. We see this on iPhone and MacOS. This is one of the things Dave and I are still trying to deal with. |
|
,
Nov 26, 2009
Is there another option for processing zip files in memory that I can use until the toolbox if fixed. I cant go to an older OS unfortunately. |
|
,
Nov 26, 2009
Jamesazucker - zip or zlib? what is the issue? |
|
,
Nov 27, 2009
I am working on an application to download a .zip archive that contains market data xmls. I was planning to use the toolkit for unziping and extacting the documents in memory(they are small...). Can you suggest how I can maybe comment out some section of the toolkit so I can progress this weekend. (This is the first time I've looked at the toolkit, so I am not familiar with it yet to hack it myself quickly as I am sure I can live without the feature that is cribbing as it is file based work.) |
|
,
Nov 27, 2009
jamesazucker - This issue is for issues with the iPhone 3.1.x SDK when building on 10.6, so it doesn't seem related to what you're commented on. As far as zip support, Foundation/NSData+zlib has support for zlib streams and gzip file directly, but not for .zip archives (as they can have multiple files, not a single payload). If you'd like to contribute something back for handling zip archives, it could be built on top of what is already there, just doesn't exist in GTM yet. |
|
,
Nov 27, 2009
(No comment was entered for this change.)
Summary: deprecation as errors for GTMiPhoneUnitTesting in 3.1.2 SDK on snow-leopard (Xcode 3.2.x)
|
|
,
Nov 27, 2009
Thomas, I am trying to build the toolbox on the target you have specified, I think the NSData+zlib will work for me, if not I will adapt it and contribute, but I need to get the toolkit compiling on my target to accomplish that. I will extract these one class and see if I can get it working without the toolkit. |
|
,
Nov 28, 2009
I believe all of these are fixed for the Xcode 3.2.x tool chain. Let me know if I missed anything.
Status: Fixed
|
|
|
|