{"action":"created","issue":{"url":"https://api.github.com/repos/neovim/neovim/issues/567","labels_url":"https://api.github.com/repos/neovim/neovim/issues/567/labels{/name}","comments_url":"https://api.github.com/repos/neovim/neovim/issues/567/comments","events_url":"https://api.github.com/repos/neovim/neovim/issues/567/events","html_url":"https://github.com/neovim/neovim/issues/567","id":31840129,"number":567,"title":"Enable -Wconversion file by file","user":{"login":"aktau","id":189413,"avatar_url":"https://avatars.githubusercontent.com/u/189413?v=3","gravatar_id":"","url":"https://api.github.com/users/aktau","html_url":"https://github.com/aktau","followers_url":"https://api.github.com/users/aktau/followers","following_url":"https://api.github.com/users/aktau/following{/other_user}","gists_url":"https://api.github.com/users/aktau/gists{/gist_id}","starred_url":"https://api.github.com/users/aktau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aktau/subscriptions","organizations_url":"https://api.github.com/users/aktau/orgs","repos_url":"https://api.github.com/users/aktau/repos","events_url":"https://api.github.com/users/aktau/events{/privacy}","received_events_url":"https://api.github.com/users/aktau/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/neovim/neovim/labels/entry-level","name":"entry-level","color":"009800"},{"url":"https://api.github.com/repos/neovim/neovim/labels/robustness","name":"robustness","color":"207de5"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":40,"created_at":"2014-04-19T08:20:51Z","updated_at":"2015-02-18T09:54:50Z","closed_at":null,"body":"As illustrated here: https://github.com/tarruda/neovim/commit/86ea80dbd3b2a704c897e02d1d6ed8f01b92c96b#commitcomment-5984214 it often easy to make mistakes like assigning a variable of a wider type to a variable of a smaller type (`size_t` to `uint32_t` for example). The compiler doesn't warn about this without the `-Wconversion` flag. (in this case it wouldn't have warned even with the flag on on travis, which is 32-bits, but it would warn for anyone with a 64-bits OS, where `size_t` is usually 64-bits wide).\r\n\r\nSadly, the vim/neovim codebase has a lot (1000s of warnings) of things like this, and I'd wager that 99% of these assignments and over-casting are not really a problem (vim seems to be rather stable and works on a lot of platforms), but it's a class of issues that's easy to detect before they even take hold.\r\n\r\nSince it's unfeasible for one person to do all this work on him/herself, it was proposed that this would be done on a file by file basis. With the workflow like this:\r\n\r\n1. Create a branch\r\n2. Enable `-Wconversion` for a file and fix the resulting warnings (1 commit)\r\n3. Find another file that doesn't have `-Wconversion ` enabled yet and goto 2 as long as you feel like it\r\n4. Send PR\r\n\r\nAlso: any new files should be `-Wconversion` checked from the beginning.\r\n\r\nAny takers just inform the rest of the team here!\r\n\r\n@jszakmeister will hopefully be able to conjure up the groundwork for file-by-file enabling of certain flags once he's back from vacation :).\r\n\r\n<bountysource-plugin>\r\n\r\n---\r\nWant to back this issue? **[Place a bounty on it!](https://www.bountysource.com/issues/1740025-enable-wconversion-file-by-file?utm_campaign=plugin&utm_content=tracker%2F461131&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F461131&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"},"comment":{"url":"https://api.github.com/repos/neovim/neovim/issues/comments/74838697","html_url":"https://github.com/neovim/neovim/issues/567#issuecomment-74838697","issue_url":"https://api.github.com/repos/neovim/neovim/issues/567","id":74838697,"user":{"login":"Numkil","id":5604686,"avatar_url":"https://avatars.githubusercontent.com/u/5604686?v=3","gravatar_id":"","url":"https://api.github.com/users/Numkil","html_url":"https://github.com/Numkil","followers_url":"https://api.github.com/users/Numkil/followers","following_url":"https://api.github.com/users/Numkil/following{/other_user}","gists_url":"https://api.github.com/users/Numkil/gists{/gist_id}","starred_url":"https://api.github.com/users/Numkil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Numkil/subscriptions","organizations_url":"https://api.github.com/users/Numkil/orgs","repos_url":"https://api.github.com/users/Numkil/repos","events_url":"https://api.github.com/users/Numkil/events{/privacy}","received_events_url":"https://api.github.com/users/Numkil/received_events","type":"User","site_admin":false},"created_at":"2015-02-18T09:54:50Z","updated_at":"2015-02-18T09:54:50Z","body":"K thanks for warning me, it's hard checking every single pr and commit for stuff that might have been done already when you are trying to get your feet wet in a project like this. "}}