{"action":"created","comment":{"url":"https://api.github.com/repos/ocaml/ocaml/pulls/comments/192774458","pull_request_review_id":125614802,"id":192774458,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5Mjc3NDQ1OA==","diff_hunk":"@@ -286,13 +286,13 @@ static int32_t caml_swap32(int32_t x)\n }\n \n value caml_int32_direct_bswap(value v)\n-{ return caml_swap32(v); }\n+{ return caml_swap32((int32_t) v); }","path":"byterun/ints.c","position":5,"original_position":5,"commit_id":"03d8f0caeabf19452683d64e9f63c845f2011c81","original_commit_id":"03d8f0caeabf19452683d64e9f63c845f2011c81","user":{"login":"damiendoligez","id":19104,"node_id":"MDQ6VXNlcjE5MTA0","avatar_url":"https://avatars2.githubusercontent.com/u/19104?v=4","gravatar_id":"","url":"https://api.github.com/users/damiendoligez","html_url":"https://github.com/damiendoligez","followers_url":"https://api.github.com/users/damiendoligez/followers","following_url":"https://api.github.com/users/damiendoligez/following{/other_user}","gists_url":"https://api.github.com/users/damiendoligez/gists{/gist_id}","starred_url":"https://api.github.com/users/damiendoligez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/damiendoligez/subscriptions","organizations_url":"https://api.github.com/users/damiendoligez/orgs","repos_url":"https://api.github.com/users/damiendoligez/repos","events_url":"https://api.github.com/users/damiendoligez/events{/privacy}","received_events_url":"https://api.github.com/users/damiendoligez/received_events","type":"User","site_admin":false},"body":"The asymmetry just feels slightly odd, but it can stay this way.","created_at":"2018-06-04T15:06:13Z","updated_at":"2018-06-04T15:06:13Z","html_url":"https://github.com/ocaml/ocaml/pull/1812#discussion_r192774458","pull_request_url":"https://api.github.com/repos/ocaml/ocaml/pulls/1812","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/ocaml/ocaml/pulls/comments/192774458"},"html":{"href":"https://github.com/ocaml/ocaml/pull/1812#discussion_r192774458"},"pull_request":{"href":"https://api.github.com/repos/ocaml/ocaml/pulls/1812"}},"in_reply_to_id":192738127},"pull_request":{"url":"https://api.github.com/repos/ocaml/ocaml/pulls/1812","id":192235484,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkyMjM1NDg0","html_url":"https://github.com/ocaml/ocaml/pull/1812","diff_url":"https://github.com/ocaml/ocaml/pull/1812.diff","patch_url":"https://github.com/ocaml/ocaml/pull/1812.patch","issue_url":"https://api.github.com/repos/ocaml/ocaml/issues/1812","number":1812,"state":"open","locked":false,"title":"Cleaning up the C code","user":{"login":"xavierleroy","id":3845810,"node_id":"MDQ6VXNlcjM4NDU4MTA=","avatar_url":"https://avatars0.githubusercontent.com/u/3845810?v=4","gravatar_id":"","url":"https://api.github.com/users/xavierleroy","html_url":"https://github.com/xavierleroy","followers_url":"https://api.github.com/users/xavierleroy/followers","following_url":"https://api.github.com/users/xavierleroy/following{/other_user}","gists_url":"https://api.github.com/users/xavierleroy/gists{/gist_id}","starred_url":"https://api.github.com/users/xavierleroy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xavierleroy/subscriptions","organizations_url":"https://api.github.com/users/xavierleroy/orgs","repos_url":"https://api.github.com/users/xavierleroy/repos","events_url":"https://api.github.com/users/xavierleroy/events{/privacy}","received_events_url":"https://api.github.com/users/xavierleroy/received_events","type":"User","site_admin":false},"body":"This PR is the result of running the C code of OCaml through Clang 6.0 and GCC 8 with full warnings on.  This produces a lot of warnings!  Some of the warnings point to areas of the code that can obviously be improved or cleaned up.  That's what this PR does. \r\n\r\nIt's better reviewed commit by commit.  The only nontrivial commit is https://github.com/ocaml/ocaml/pull/1812/commits/03d8f0caeabf19452683d64e9f63c845f2011c81, which replaces some uses of `int` by more appropriate types like `intnat`.  On a 64-bit platform, `int` is only 32 bits and may not represent correctly e.g. the length of a string or the size of an OCaml heap block.  This commit replaces a number of uses of `int` by other types that are 64-bit wide on 64-bit architectures, such as `intnat` or `uintnat` or `size_t` or `mlsize_t`.\r\n    \r\nSometimes an `intnat` was used as an `int` and is intended as a Boolean (0 or 1); then it was replaced by an `int`.\r\n    \r\nThere are many remaining cases where we assign a 64-bit quantity to a 32-bit `int` variable.  Either I believe these cases are safe (e.g. the 64-bit quantity is the difference between two pointers within an I/O buffer, something that always fits in 32 bits), or the code change was not obvious and too risky.\r\n    \r\n","created_at":"2018-06-03T08:00:21Z","updated_at":"2018-06-04T15:06:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c2789a82336239756c365beb38b6036ff3aaac7e","assignee":null,"assignees":[],"requested_reviewers":[{"login":"shindere","id":5877758,"node_id":"MDQ6VXNlcjU4Nzc3NTg=","avatar_url":"https://avatars1.githubusercontent.com/u/5877758?v=4","gravatar_id":"","url":"https://api.github.com/users/shindere","html_url":"https://github.com/shindere","followers_url":"https://api.github.com/users/shindere/followers","following_url":"https://api.github.com/users/shindere/following{/other_user}","gists_url":"https://api.github.com/users/shindere/gists{/gist_id}","starred_url":"https://api.github.com/users/shindere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shindere/subscriptions","organizations_url":"https://api.github.com/users/shindere/orgs","repos_url":"https://api.github.com/users/shindere/repos","events_url":"https://api.github.com/users/shindere/events{/privacy}","received_events_url":"https://api.github.com/users/shindere/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ocaml/ocaml/pulls/1812/commits","review_comments_url":"https://api.github.com/repos/ocaml/ocaml/pulls/1812/comments","review_comment_url":"https://api.github.com/repos/ocaml/ocaml/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ocaml/ocaml/issues/1812/comments","statuses_url":"https://api.github.com/repos/ocaml/ocaml/statuses/03d8f0caeabf19452683d64e9f63c845f2011c81","head":{"label":"xavierleroy:c-cleanups","ref":"c-cleanups","sha":"03d8f0caeabf19452683d64e9f63c845f2011c81","user":{"login":"xavierleroy","id":3845810,"node_id":"MDQ6VXNlcjM4NDU4MTA=","avatar_url":"https://avatars0.githubusercontent.com/u/3845810?v=4","gravatar_id":"","url":"https://api.github.com/users/xavierleroy","html_url":"https://github.com/xavierleroy","followers_url":"https://api.github.com/users/xavierleroy/followers","following_url":"https://api.github.com/users/xavierleroy/following{/other_user}","gists_url":"https://api.github.com/users/xavierleroy/gists{/gist_id}","starred_url":"https://api.github.com/users/xavierleroy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xavierleroy/subscriptions","organizations_url":"https://api.github.com/users/xavierleroy/orgs","repos_url":"https://api.github.com/users/xavierleroy/repos","events_url":"https://api.github.com/users/xavierleroy/events{/privacy}","received_events_url":"https://api.github.com/users/xavierleroy/received_events","type":"User","site_admin":false},"repo":{"id":45117244,"node_id":"MDEwOlJlcG9zaXRvcnk0NTExNzI0NA==","name":"ocaml","full_name":"xavierleroy/ocaml","owner":{"login":"xavierleroy","id":3845810,"node_id":"MDQ6VXNlcjM4NDU4MTA=","avatar_url":"https://avatars0.githubusercontent.com/u/3845810?v=4","gravatar_id":"","url":"https://api.github.com/users/xavierleroy","html_url":"https://github.com/xavierleroy","followers_url":"https://api.github.com/users/xavierleroy/followers","following_url":"https://api.github.com/users/xavierleroy/following{/other_user}","gists_url":"https://api.github.com/users/xavierleroy/gists{/gist_id}","starred_url":"https://api.github.com/users/xavierleroy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xavierleroy/subscriptions","organizations_url":"https://api.github.com/users/xavierleroy/orgs","repos_url":"https://api.github.com/users/xavierleroy/repos","events_url":"https://api.github.com/users/xavierleroy/events{/privacy}","received_events_url":"https://api.github.com/users/xavierleroy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/xavierleroy/ocaml","description":"The core OCaml system: compilers, runtime system, base libraries","fork":true,"url":"https://api.github.com/repos/xavierleroy/ocaml","forks_url":"https://api.github.com/repos/xavierleroy/ocaml/forks","keys_url":"https://api.github.com/repos/xavierleroy/ocaml/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xavierleroy/ocaml/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xavierleroy/ocaml/teams","hooks_url":"https://api.github.com/repos/xavierleroy/ocaml/hooks","issue_events_url":"https://api.github.com/repos/xavierleroy/ocaml/issues/events{/number}","events_url":"https://api.github.com/repos/xavierleroy/ocaml/events","assignees_url":"https://api.github.com/repos/xavierleroy/ocaml/assignees{/user}","branches_url":"https://api.github.com/repos/xavierleroy/ocaml/branches{/branch}","tags_url":"https://api.github.com/repos/xavierleroy/ocaml/tags","blobs_url":"https://api.github.com/repos/xavierleroy/ocaml/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xavierleroy/ocaml/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xavierleroy/ocaml/git/refs{/sha}","trees_url":"https://api.github.com/repos/xavierleroy/ocaml/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xavierleroy/ocaml/statuses/{sha}","languages_url":"https://api.github.com/repos/xavierleroy/ocaml/languages","stargazers_url":"https://api.github.com/repos/xavierleroy/ocaml/stargazers","contributors_url":"https://api.github.com/repos/xavierleroy/ocaml/contributors","subscribers_url":"https://api.github.com/repos/xavierleroy/ocaml/subscribers","subscription_url":"https://api.github.com/repos/xavierleroy/ocaml/subscription","commits_url":"https://api.github.com/repos/xavierleroy/ocaml/commits{/sha}","git_commits_url":"https://api.github.com/repos/xavierleroy/ocaml/git/commits{/sha}","comments_url":"https://api.github.com/repos/xavierleroy/ocaml/comments{/number}","issue_comment_url":"https://api.github.com/repos/xavierleroy/ocaml/issues/comments{/number}","contents_url":"https://api.github.com/repos/xavierleroy/ocaml/contents/{+path}","compare_url":"https://api.github.com/repos/xavierleroy/ocaml/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xavierleroy/ocaml/merges","archive_url":"https://api.github.com/repos/xavierleroy/ocaml/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xavierleroy/ocaml/downloads","issues_url":"https://api.github.com/repos/xavierleroy/ocaml/issues{/number}","pulls_url":"https://api.github.com/repos/xavierleroy/ocaml/pulls{/number}","milestones_url":"https://api.github.com/repos/xavierleroy/ocaml/milestones{/number}","notifications_url":"https://api.github.com/repos/xavierleroy/ocaml/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xavierleroy/ocaml/labels{/name}","releases_url":"https://api.github.com/repos/xavierleroy/ocaml/releases{/id}","deployments_url":"https://api.github.com/repos/xavierleroy/ocaml/deployments","created_at":"2015-10-28T14:17:04Z","updated_at":"2017-02-24T14:45:39Z","pushed_at":"2018-06-03T07:30:17Z","git_url":"git://github.com/xavierleroy/ocaml.git","ssh_url":"git@github.com:xavierleroy/ocaml.git","clone_url":"https://github.com/xavierleroy/ocaml.git","svn_url":"https://github.com/xavierleroy/ocaml","homepage":"","size":163380,"stargazers_count":2,"watchers_count":2,"language":"OCaml","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":2,"default_branch":"trunk"}},"base":{"label":"ocaml:trunk","ref":"trunk","sha":"5d1022dc26c3251f8d54e7cb6fa344fd2b1b92d7","user":{"login":"ocaml","id":1841483,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE4NDE0ODM=","avatar_url":"https://avatars3.githubusercontent.com/u/1841483?v=4","gravatar_id":"","url":"https://api.github.com/users/ocaml","html_url":"https://github.com/ocaml","followers_url":"https://api.github.com/users/ocaml/followers","following_url":"https://api.github.com/users/ocaml/following{/other_user}","gists_url":"https://api.github.com/users/ocaml/gists{/gist_id}","starred_url":"https://api.github.com/users/ocaml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ocaml/subscriptions","organizations_url":"https://api.github.com/users/ocaml/orgs","repos_url":"https://api.github.com/users/ocaml/repos","events_url":"https://api.github.com/users/ocaml/events{/privacy}","received_events_url":"https://api.github.com/users/ocaml/received_events","type":"Organization","site_admin":false},"repo":{"id":6786166,"node_id":"MDEwOlJlcG9zaXRvcnk2Nzg2MTY2","name":"ocaml","full_name":"ocaml/ocaml","owner":{"login":"ocaml","id":1841483,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE4NDE0ODM=","avatar_url":"https://avatars3.githubusercontent.com/u/1841483?v=4","gravatar_id":"","url":"https://api.github.com/users/ocaml","html_url":"https://github.com/ocaml","followers_url":"https://api.github.com/users/ocaml/followers","following_url":"https://api.github.com/users/ocaml/following{/other_user}","gists_url":"https://api.github.com/users/ocaml/gists{/gist_id}","starred_url":"https://api.github.com/users/ocaml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ocaml/subscriptions","organizations_url":"https://api.github.com/users/ocaml/orgs","repos_url":"https://api.github.com/users/ocaml/repos","events_url":"https://api.github.com/users/ocaml/events{/privacy}","received_events_url":"https://api.github.com/users/ocaml/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ocaml/ocaml","description":"The core OCaml system: compilers, runtime system, base libraries","fork":false,"url":"https://api.github.com/repos/ocaml/ocaml","forks_url":"https://api.github.com/repos/ocaml/ocaml/forks","keys_url":"https://api.github.com/repos/ocaml/ocaml/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ocaml/ocaml/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ocaml/ocaml/teams","hooks_url":"https://api.github.com/repos/ocaml/ocaml/hooks","issue_events_url":"https://api.github.com/repos/ocaml/ocaml/issues/events{/number}","events_url":"https://api.github.com/repos/ocaml/ocaml/events","assignees_url":"https://api.github.com/repos/ocaml/ocaml/assignees{/user}","branches_url":"https://api.github.com/repos/ocaml/ocaml/branches{/branch}","tags_url":"https://api.github.com/repos/ocaml/ocaml/tags","blobs_url":"https://api.github.com/repos/ocaml/ocaml/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ocaml/ocaml/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ocaml/ocaml/git/refs{/sha}","trees_url":"https://api.github.com/repos/ocaml/ocaml/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ocaml/ocaml/statuses/{sha}","languages_url":"https://api.github.com/repos/ocaml/ocaml/languages","stargazers_url":"https://api.github.com/repos/ocaml/ocaml/stargazers","contributors_url":"https://api.github.com/repos/ocaml/ocaml/contributors","subscribers_url":"https://api.github.com/repos/ocaml/ocaml/subscribers","subscription_url":"https://api.github.com/repos/ocaml/ocaml/subscription","commits_url":"https://api.github.com/repos/ocaml/ocaml/commits{/sha}","git_commits_url":"https://api.github.com/repos/ocaml/ocaml/git/commits{/sha}","comments_url":"https://api.github.com/repos/ocaml/ocaml/comments{/number}","issue_comment_url":"https://api.github.com/repos/ocaml/ocaml/issues/comments{/number}","contents_url":"https://api.github.com/repos/ocaml/ocaml/contents/{+path}","compare_url":"https://api.github.com/repos/ocaml/ocaml/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ocaml/ocaml/merges","archive_url":"https://api.github.com/repos/ocaml/ocaml/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ocaml/ocaml/downloads","issues_url":"https://api.github.com/repos/ocaml/ocaml/issues{/number}","pulls_url":"https://api.github.com/repos/ocaml/ocaml/pulls{/number}","milestones_url":"https://api.github.com/repos/ocaml/ocaml/milestones{/number}","notifications_url":"https://api.github.com/repos/ocaml/ocaml/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ocaml/ocaml/labels{/name}","releases_url":"https://api.github.com/repos/ocaml/ocaml/releases{/id}","deployments_url":"https://api.github.com/repos/ocaml/ocaml/deployments","created_at":"2012-11-20T22:18:22Z","updated_at":"2018-06-04T14:44:38Z","pushed_at":"2018-06-04T14:44:12Z","git_url":"git://github.com/ocaml/ocaml.git","ssh_url":"git@github.com:ocaml/ocaml.git","clone_url":"https://github.com/ocaml/ocaml.git","svn_url":"https://github.com/ocaml/ocaml","homepage":"","size":170186,"stargazers_count":1835,"watchers_count":1835,"language":"OCaml","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":459,"mirror_url":null,"archived":false,"open_issues_count":152,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":459,"open_issues":152,"watchers":1835,"default_branch":"trunk"}},"_links":{"self":{"href":"https://api.github.com/repos/ocaml/ocaml/pulls/1812"},"html":{"href":"https://github.com/ocaml/ocaml/pull/1812"},"issue":{"href":"https://api.github.com/repos/ocaml/ocaml/issues/1812"},"comments":{"href":"https://api.github.com/repos/ocaml/ocaml/issues/1812/comments"},"review_comments":{"href":"https://api.github.com/repos/ocaml/ocaml/pulls/1812/comments"},"review_comment":{"href":"https://api.github.com/repos/ocaml/ocaml/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ocaml/ocaml/pulls/1812/commits"},"statuses":{"href":"https://api.github.com/repos/ocaml/ocaml/statuses/03d8f0caeabf19452683d64e9f63c845f2011c81"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"damiendoligez"}}