{"issue":{"created_at":"2011-11-15T15:35:26Z","state":"open","updated_at":"2011-11-24T12:26:16Z","comments":2,"user":{"gravatar_id":"970e963a5578ee33236e40e9633f86dc","id":73397,"url":"https://api.github.com/users/MikeWeller","login":"MikeWeller","avatar_url":"https://secure.gravatar.com/avatar/970e963a5578ee33236e40e9633f86dc?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"We compile with very strict compiler options, most notibly -Wconversion which will warn about any implicit conversions between signed and unsigned as well as when an integer is casted down in size.\r\n\r\nI added a bunch of explicit casts to get rid of these warnings. I took care to examine the code and make sure the casts make sense. In all cases the behaviour is unchanged, although I don't have any unit tests to run (see Issue #56). We're just making the implicit casts explicit.\r\n\r\nI also fixed a few other problems:\r\n\r\nThe commits:\r\n\r\nCommit 1 adds an additional check for __STRICT_ANSI__ to __GNUC__ to decide between the stubbed out macros like JK_ATTRIBUTES and the real versions. clang will define __GNUC__ even when compiling with -pedantic mode where some of the GNUC features are not allowed (like certain comma pasting and macro varargs stuff)\r\n\r\nCommit 2 fixes a warning about unused varargs in the stub version of the JK_ATTRIBUTES macro. This is a silly warning but we can just remove the first argument since the whole thing is a NOP anyway.\r\n\r\nCommit 3 Fixes a bunch of implicit sign conversion warnings when using ~ to remove a flag. ~ will return a signed integer so we cast the result to the flag type we want. An alternative would be to declare JKFlags as NSInteger but I thought this is was better choice since all the flag values should be generated as unsigned by the compiler.\r\n\r\nCommit 4 replaces the non-standard triple-dot '...' style cases. Ugly but follows standards.\r\n\r\nCommit 5 fixes all the implicit conversions between different pointer sizes and signedness.\r\n\r\nCheers,\r\n\r\nMike","assignee":{"gravatar_id":"1b33e4065ce33ca9873fea6074682a5d","id":80060,"url":"https://api.github.com/users/johnezang","login":"johnezang","avatar_url":"https://secure.gravatar.com/avatar/1b33e4065ce33ca9873fea6074682a5d?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"labels":[{"name":"Pending","color":"ff8000","url":"https://api.github.com/repos/johnezang/JSONKit/labels/Pending"},{"name":"Will Implement","color":"bdffbd","url":"https://api.github.com/repos/johnezang/JSONKit/labels/Will+Implement"}],"id":2245339,"pull_request":{"patch_url":"https://github.com/johnezang/JSONKit/pull/57.patch","html_url":"https://github.com/johnezang/JSONKit/pull/57","diff_url":"https://github.com/johnezang/JSONKit/pull/57.diff"},"number":57,"title":"Fixes warnings when compiling with -Wconversion and -pedantic etc.","closed_at":null,"html_url":"https://github.com/johnezang/JSONKit/issues/57","milestone":null,"url":"https://api.github.com/repos/johnezang/JSONKit/issues/57"},"action":"created","comment":{"created_at":"2011-11-24T12:26:16Z","updated_at":"2011-11-24T12:26:16Z","user":{"gravatar_id":"970e963a5578ee33236e40e9633f86dc","id":73397,"url":"https://api.github.com/users/MikeWeller","login":"MikeWeller","avatar_url":"https://secure.gravatar.com/avatar/970e963a5578ee33236e40e9633f86dc?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"Yeah I didn't really expect this to get merged into the official repo. I can understand it takes a while to review all this and for most people it is unnecessary. I just thought I'd put it out there since I had done the work.\r\n\r\nCheers,\r\n\r\nMike","id":2862830,"url":"https://api.github.com/repos/johnezang/JSONKit/issues/comments/2862830"}}