TouchCode / TouchJSON

A humane JSON Objective-C un-framework. (TouchJSON has been deprecated - see README)
http://touchcode.com/
Other
800 stars 169 forks source link

Xcode warning fix. #12

Closed lhunath closed 13 years ago

lhunath commented 13 years ago

The latest Xcode can now warn about a few more type incompatibilities. This fixes some warnings in TouchJSON:

diff --git a/Source/JSON/CJSONScanner.m b/Source/JSON/CJSONScanner.m
index c5ffeb4..1e4eb41 100644
--- a/Source/JSON/CJSONScanner.m
+++ b/Source/JSON/CJSONScanner.m
@@ -37,7 +37,7 @@

 NSString *const kJSONScannerErrorDomain = @"kJSONScannerErrorDomain";

-inline static int HexToInt(char inCharacter)
+inline static int HexToInt(unichar inCharacter)
     {
     int theValues[] = { 0x0 /* 48 '0' */, 0x1 /* 49 '1' */, 0x2 /* 50 '2' */, 0x3 /* 51 '3' */, 0x4 /* 52 '4' */, 0x5 /* 53 '5' */, 0x6 /* 54 '6' */, 0x7 /* 55 '7' */, 0x8 /* 56 '8' */, 0x9 /* 57 '9' */, -1 /* 58 ':' */, -1 /* 59 ';' */, -1 /* 60 '<' */, -1 /* 61 '=' */, -1 /* 62 '>' */, -1 /* 63 '?' */, -1 /* 64 '@' */, 0xa /* 65 'A' */, 0xb /* 66 'B' */, 0xc /* 67 'C' */, 0xd /* 68 'D' */, 0xe /* 69 'E' */, 0xf /* 70 'F' */, -1 /* 71 'G' */, -1 /* 72 'H' */, -1 /* 73 'I' */, -1 /* 74 'J' */, -1 /* 75 'K' */, -1 /* 76 'L' */, -1 /* 77 'M' */, -1 /* 78 'N' */, -1 /* 79 'O' */, -1 /* 80 'P' */, -1 /* 81 'Q' */, -1 /* 82 'R' */, -1 /* 83 'S' */, -1 /* 84 'T' */, -1 /* 85 'U' */, -1 /* 86 'V' */, -1 /* 87 'W' */, -1 /* 88 'X' */, -1 /* 89 'Y' */, -1 /* 90 'Z' */, -1 /* 91 '[' */, -1 /* 92 '\' */, -1 /* 93 ']' */, -1 /* 94 '^' */, -1 /* 95 '_' */, -1 /* 96 '`' */, 0xa /* 97 'a' */, 0xb /* 98 'b' */, 0xc /* 99 'c' */, 0xd /* 100 'd' */, 0xe /* 101 'e' */, 0xf /* 102 'f' */, };
     if (inCharacter >= '0' && inCharacter <= 'f')
schwa commented 13 years ago

What warning do i need to enable for this? I have a pretty strict set of warnings and am not seeing it.

Please - file a bug with info on how to reproduce or issue a pull request. (Ideally do both).