JSONKit icon indicating copy to clipboard operation
JSONKit copied to clipboard

Type conversions and deprecated methods

Open soffes opened this issue 14 years ago • 2 comments

With the following build options enabled, there are 21 errors:

Implicit Conversion to 32 Bit Type
Implicit Signedness Conversions
Suspicious Implicit Conversions
Overriding Deprecated Objective-C Methods

It would be awesome if JSONKit didn't cause errors with these options enabled. I tried fixing the issues, but your crazy C stuff is a bit over my head.

soffes avatar Nov 08 '11 18:11 soffes

Do you have the particular flags you used to get the warnings? And which compiler (and version)? Each version of clang seems to change what it whines about, unfortunately. At one point, JSONKit compiled fairly warning free even with the knobs turned up to 11, though there were still a few warnings that I couldn't do anything about (mostly involving casting between Cocoa / Foundation and CoreFoundation).

johnezang avatar Nov 17 '11 21:11 johnezang

Here are the keys for those warnings:

  • GCC_WARN_64_TO_32_BIT_CONVERSION
  • CLANG_WARN_IMPLICIT_SIGN_CONVERSION
  • CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION
  • CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS

I'm using "Apple LLVM compiler 3.0". Thanks John!

soffes avatar Nov 17 '11 21:11 soffes