{"action":"created","issue":{"url":"https://api.github.com/repos/neomutt/neomutt/issues/1085","repository_url":"https://api.github.com/repos/neomutt/neomutt","labels_url":"https://api.github.com/repos/neomutt/neomutt/issues/1085/labels{/name}","comments_url":"https://api.github.com/repos/neomutt/neomutt/issues/1085/comments","events_url":"https://api.github.com/repos/neomutt/neomutt/issues/1085/events","html_url":"https://github.com/neomutt/neomutt/pull/1085","id":301493068,"number":1085,"title":"Devel/cppcheck warning","user":{"login":"fekir","id":11912465,"avatar_url":"https://avatars1.githubusercontent.com/u/11912465?v=4","gravatar_id":"","url":"https://api.github.com/users/fekir","html_url":"https://github.com/fekir","followers_url":"https://api.github.com/users/fekir/followers","following_url":"https://api.github.com/users/fekir/following{/other_user}","gists_url":"https://api.github.com/users/fekir/gists{/gist_id}","starred_url":"https://api.github.com/users/fekir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fekir/subscriptions","organizations_url":"https://api.github.com/users/fekir/orgs","repos_url":"https://api.github.com/users/fekir/repos","events_url":"https://api.github.com/users/fekir/events{/privacy}","received_events_url":"https://api.github.com/users/fekir/received_events","type":"User","site_admin":false},"labels":[{"id":523386465,"url":"https://api.github.com/repos/neomutt/neomutt/labels/status:in-progress","name":"status:in-progress","color":"1d76db","default":false}],"state":"open","locked":false,"assignee":{"login":"fekir","id":11912465,"avatar_url":"https://avatars1.githubusercontent.com/u/11912465?v=4","gravatar_id":"","url":"https://api.github.com/users/fekir","html_url":"https://github.com/fekir","followers_url":"https://api.github.com/users/fekir/followers","following_url":"https://api.github.com/users/fekir/following{/other_user}","gists_url":"https://api.github.com/users/fekir/gists{/gist_id}","starred_url":"https://api.github.com/users/fekir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fekir/subscriptions","organizations_url":"https://api.github.com/users/fekir/orgs","repos_url":"https://api.github.com/users/fekir/repos","events_url":"https://api.github.com/users/fekir/events{/privacy}","received_events_url":"https://api.github.com/users/fekir/received_events","type":"User","site_admin":false},"assignees":[{"login":"flatcap","id":76760,"avatar_url":"https://avatars3.githubusercontent.com/u/76760?v=4","gravatar_id":"","url":"https://api.github.com/users/flatcap","html_url":"https://github.com/flatcap","followers_url":"https://api.github.com/users/flatcap/followers","following_url":"https://api.github.com/users/flatcap/following{/other_user}","gists_url":"https://api.github.com/users/flatcap/gists{/gist_id}","starred_url":"https://api.github.com/users/flatcap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flatcap/subscriptions","organizations_url":"https://api.github.com/users/flatcap/orgs","repos_url":"https://api.github.com/users/flatcap/repos","events_url":"https://api.github.com/users/flatcap/events{/privacy}","received_events_url":"https://api.github.com/users/flatcap/received_events","type":"User","site_admin":false},{"login":"fekir","id":11912465,"avatar_url":"https://avatars1.githubusercontent.com/u/11912465?v=4","gravatar_id":"","url":"https://api.github.com/users/fekir","html_url":"https://github.com/fekir","followers_url":"https://api.github.com/users/fekir/followers","following_url":"https://api.github.com/users/fekir/following{/other_user}","gists_url":"https://api.github.com/users/fekir/gists{/gist_id}","starred_url":"https://api.github.com/users/fekir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fekir/subscriptions","organizations_url":"https://api.github.com/users/fekir/orgs","repos_url":"https://api.github.com/users/fekir/repos","events_url":"https://api.github.com/users/fekir/events{/privacy}","received_events_url":"https://api.github.com/users/fekir/received_events","type":"User","site_admin":false}],"milestone":null,"comments":7,"created_at":"2018-03-01T17:31:39Z","updated_at":"2018-03-03T13:52:34Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/neomutt/neomutt/pulls/1085","html_url":"https://github.com/neomutt/neomutt/pull/1085","diff_url":"https://github.com/neomutt/neomutt/pull/1085.diff","patch_url":"https://github.com/neomutt/neomutt/pull/1085.patch"},"body":"* **What does this PR do?**\r\nClean up warnings issued by static analyzers, I want to get more confident with the code base.\r\nMost commits simply reduce the scope of variable, eventually remove unused variables and sprinkles `const` here and there. Mainly minor changes with a low chance to break something.\r\n\r\n* **Are there points in the code the reviewer needs to double check?**\r\nThat no behavior has been accidentally changed, for example changing\r\n`````\r\nvoid f(int x)\r\n{\r\n  int i = 0;\r\n  for (int n = 0; n < 10; ++n)\r\n  {\r\n    do_something(&i);\r\n  }\r\n}\r\n````` \r\nto \r\n`````\r\nvoid f(int x)\r\n{ \r\n  for (int n = 0; n < 10; ++n)\r\n  {  \r\n    int i = 0;\r\n    do_something(&i);\r\n  }\r\n}\r\n\r\n````` \r\nwould be a possibly invalid change.\r\n\r\n\r\n* **Does this PR meet the acceptance criteria?**\r\nI think so, and I would also propose to add to the  [style guide](https://www.neomutt.org/dev/coding-style) that variables, if possible, should be declared as `const`.\r\n"},"comment":{"url":"https://api.github.com/repos/neomutt/neomutt/issues/comments/370149008","html_url":"https://github.com/neomutt/neomutt/pull/1085#issuecomment-370149008","issue_url":"https://api.github.com/repos/neomutt/neomutt/issues/1085","id":370149008,"user":{"login":"flatcap","id":76760,"avatar_url":"https://avatars3.githubusercontent.com/u/76760?v=4","gravatar_id":"","url":"https://api.github.com/users/flatcap","html_url":"https://github.com/flatcap","followers_url":"https://api.github.com/users/flatcap/followers","following_url":"https://api.github.com/users/flatcap/following{/other_user}","gists_url":"https://api.github.com/users/flatcap/gists{/gist_id}","starred_url":"https://api.github.com/users/flatcap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flatcap/subscriptions","organizations_url":"https://api.github.com/users/flatcap/orgs","repos_url":"https://api.github.com/users/flatcap/repos","events_url":"https://api.github.com/users/flatcap/events{/privacy}","received_events_url":"https://api.github.com/users/flatcap/received_events","type":"User","site_admin":false},"created_at":"2018-03-03T13:52:34Z","updated_at":"2018-03-03T13:52:34Z","author_association":"OWNER","body":"I've re-ordered, renamed and merged your 'reducing scope' commits.\r\nI've added the filename to messages so we can tell them apart."}}
{"actor":{"display_login":"flatcap"}}