isaacandy / google-toolbox-for-mac

Apache License 2.0
0 stars 0 forks source link

Deprecation warning in _GTMDevAssert when compiling on iPhone OS #33

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In GTMDefines.h, the _GTMDevAssert macro calls [NSString stringWithCString], 
which has been 
deprecated in Mac OS X v10.4. Documentation says that 
stringWithCString:encoding: should be 
used instead.

I have attached a patch that resolves the compilation warning.

Original issue reported on code.google.com by pascal.b...@gmail.com on 8 Sep 2009 at 2:58

Attachments:

GoogleCodeExporter commented 9 years ago
There seems to be a mixup. The current version of GTMDefines.h on the trunk 
already uses stringWithUTF8String: instead of stringWithCString:.
The patch you posted patches this correct file to use stringWithUTF8String: 
encoding:, which does not exist.

Some previous version of GTMDefines.h used stringWithCString:
I guess rather than patching that, just use the version on trunk.

Cheers, Chris

Original comment by chris.br...@conject.com on 11 Sep 2009 at 8:23

GoogleCodeExporter commented 9 years ago
Doh! My mistake, I had applied the patch to my local codebase which the 1.5.1 
branch and hadn't noticed that 
the trunk had been fixed to use stringWithUTF8String:

Sorry about that...

Original comment by pascal.b...@gmail.com on 15 Sep 2009 at 7:37

GoogleCodeExporter commented 9 years ago

Original comment by dmaclach on 15 Sep 2009 at 8:36