fermion42 / google-toolbox-for-mac

Automatically exported from code.google.com/p/google-toolbox-for-mac
Apache License 2.0
0 stars 0 forks source link

STAssertEquals creates compiler warning with Clang LLVM 1.0 (XCode 3.2) #34

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Use STAssertEuqals in Test (like so: STAssertEquals([field doubleValue], 
0.0, nil); )
2. Set Compiler Version to Clang LLVM 1.0 in Build Settings
3. Build

What is the expected output? What do you see instead?
A warning is shown for each use:
"result of comparison against @encode is unspecified (use strcmp instead)"

What version of the product are you using? On what operating system?
XCode 3.2 on Snow Lepoard, SDK 3.1

Please provide any additional information below.
I have attached a patch for GTMSenTestCase.h that uses strcmp instead of != for 
the comparison 
of types in STAssertEquals

Original issue reported on code.google.com by chris.br...@conject.com on 11 Sep 2009 at 9:10

Attachments:

GoogleCodeExporter commented 9 years ago
Fixed in top of tree.. I didn't use exactly your diff as there were several 
other cases of comparing @encodes that 
needed to be patched as well.

Original comment by dmaclach on 15 Sep 2009 at 9:22