{"action":"created","comment":{"url":"https://api.github.com/repos/libcheck/check/pulls/comments/69370667","id":69370667,"diff_hunk":"@@ -127,9 +127,8 @@ static int percent_passed(TestStats * t)\n {\n     if(t->n_failed == 0 && t->n_errors == 0)\n         return 100;\n-    else if(t->n_checked == 0)","path":"src/check_str.c","position":4,"original_position":4,"commit_id":"ee5b0db2618a8c378cf8b1bdac9644735b5de269","original_commit_id":"ee5b0db2618a8c378cf8b1bdac9644735b5de269","user":{"login":"brarcher","id":5264535,"avatar_url":"https://avatars.githubusercontent.com/u/5264535?v=3","gravatar_id":"","url":"https://api.github.com/users/brarcher","html_url":"https://github.com/brarcher","followers_url":"https://api.github.com/users/brarcher/followers","following_url":"https://api.github.com/users/brarcher/following{/other_user}","gists_url":"https://api.github.com/users/brarcher/gists{/gist_id}","starred_url":"https://api.github.com/users/brarcher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brarcher/subscriptions","organizations_url":"https://api.github.com/users/brarcher/orgs","repos_url":"https://api.github.com/users/brarcher/repos","events_url":"https://api.github.com/users/brarcher/events{/privacy}","received_events_url":"https://api.github.com/users/brarcher/received_events","type":"User","site_admin":false},"body":"Are these style changes or logic changes? Are these because cppcheck indicated an issue?\r\n\r\nAs least for cppcheck 1.74 no issues were detected in the src dir. The test dir did mention the following:\r\n```\r\n[tests/check_check_pack.c:323] -> [tests/check_check_pack.c:328]: (warning) Either the condition 'rmsg!=0' is redundant or there is possible null pointer dereference: rmsg.\r\n```\r\nWhich seems to indicate that there is a redundant null check. The following resolves this:\r\n```\r\ndiff --git a/tests/check_check_pack.c b/tests/check_check_pack.c\r\nindex 7da7e57..dd5d557 100644\r\n--- a/tests/check_check_pack.c\r\n+++ b/tests/check_check_pack.c\r\n@@ -325,7 +325,6 @@ START_TEST(test_ppack_onlyctx)\r\n   ck_assert_msg (rmsg->test_line == -1,\r\n               \"Result loc line should be -1 with only CTX\");\r\n \r\n-  if (rmsg != NULL)\r\n     free (rmsg);\r\n   fclose(result_file);\r\n }\r\n```\r\n\r\nWould you mind including this into your pull request, to remove all errors/warnings before enabling the check?","created_at":"2016-07-02T01:45:50Z","updated_at":"2016-07-02T01:45:50Z","html_url":"https://github.com/libcheck/check/pull/56#discussion_r69370667","pull_request_url":"https://api.github.com/repos/libcheck/check/pulls/56","_links":{"self":{"href":"https://api.github.com/repos/libcheck/check/pulls/comments/69370667"},"html":{"href":"https://github.com/libcheck/check/pull/56#discussion_r69370667"},"pull_request":{"href":"https://api.github.com/repos/libcheck/check/pulls/56"}}},"pull_request":{"url":"https://api.github.com/repos/libcheck/check/pulls/56","id":76042781,"html_url":"https://github.com/libcheck/check/pull/56","diff_url":"https://github.com/libcheck/check/pull/56.diff","patch_url":"https://github.com/libcheck/check/pull/56.patch","issue_url":"https://api.github.com/repos/libcheck/check/issues/56","number":56,"state":"open","locked":false,"title":"Adding a test with cppcheck for Travis CI","user":{"login":"RyDroid","id":4244587,"avatar_url":"https://avatars.githubusercontent.com/u/4244587?v=3","gravatar_id":"","url":"https://api.github.com/users/RyDroid","html_url":"https://github.com/RyDroid","followers_url":"https://api.github.com/users/RyDroid/followers","following_url":"https://api.github.com/users/RyDroid/following{/other_user}","gists_url":"https://api.github.com/users/RyDroid/gists{/gist_id}","starred_url":"https://api.github.com/users/RyDroid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RyDroid/subscriptions","organizations_url":"https://api.github.com/users/RyDroid/orgs","repos_url":"https://api.github.com/users/RyDroid/repos","events_url":"https://api.github.com/users/RyDroid/events{/privacy}","received_events_url":"https://api.github.com/users/RyDroid/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-07-01T22:11:23Z","updated_at":"2016-07-02T01:45:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8560af88f7573fd3c8adb9046478317bf36bcb2e","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/libcheck/check/pulls/56/commits","review_comments_url":"https://api.github.com/repos/libcheck/check/pulls/56/comments","review_comment_url":"https://api.github.com/repos/libcheck/check/pulls/comments{/number}","comments_url":"https://api.github.com/repos/libcheck/check/issues/56/comments","statuses_url":"https://api.github.com/repos/libcheck/check/statuses/ee5b0db2618a8c378cf8b1bdac9644735b5de269","head":{"label":"RyDroid:travis-cppcheck","ref":"travis-cppcheck","sha":"ee5b0db2618a8c378cf8b1bdac9644735b5de269","user":{"login":"RyDroid","id":4244587,"avatar_url":"https://avatars.githubusercontent.com/u/4244587?v=3","gravatar_id":"","url":"https://api.github.com/users/RyDroid","html_url":"https://github.com/RyDroid","followers_url":"https://api.github.com/users/RyDroid/followers","following_url":"https://api.github.com/users/RyDroid/following{/other_user}","gists_url":"https://api.github.com/users/RyDroid/gists{/gist_id}","starred_url":"https://api.github.com/users/RyDroid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RyDroid/subscriptions","organizations_url":"https://api.github.com/users/RyDroid/orgs","repos_url":"https://api.github.com/users/RyDroid/repos","events_url":"https://api.github.com/users/RyDroid/events{/privacy}","received_events_url":"https://api.github.com/users/RyDroid/received_events","type":"User","site_admin":false},"repo":{"id":60489082,"name":"check","full_name":"RyDroid/check","owner":{"login":"RyDroid","id":4244587,"avatar_url":"https://avatars.githubusercontent.com/u/4244587?v=3","gravatar_id":"","url":"https://api.github.com/users/RyDroid","html_url":"https://github.com/RyDroid","followers_url":"https://api.github.com/users/RyDroid/followers","following_url":"https://api.github.com/users/RyDroid/following{/other_user}","gists_url":"https://api.github.com/users/RyDroid/gists{/gist_id}","starred_url":"https://api.github.com/users/RyDroid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RyDroid/subscriptions","organizations_url":"https://api.github.com/users/RyDroid/orgs","repos_url":"https://api.github.com/users/RyDroid/repos","events_url":"https://api.github.com/users/RyDroid/events{/privacy}","received_events_url":"https://api.github.com/users/RyDroid/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/RyDroid/check","description":"A unit testing framework for C","fork":true,"url":"https://api.github.com/repos/RyDroid/check","forks_url":"https://api.github.com/repos/RyDroid/check/forks","keys_url":"https://api.github.com/repos/RyDroid/check/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RyDroid/check/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RyDroid/check/teams","hooks_url":"https://api.github.com/repos/RyDroid/check/hooks","issue_events_url":"https://api.github.com/repos/RyDroid/check/issues/events{/number}","events_url":"https://api.github.com/repos/RyDroid/check/events","assignees_url":"https://api.github.com/repos/RyDroid/check/assignees{/user}","branches_url":"https://api.github.com/repos/RyDroid/check/branches{/branch}","tags_url":"https://api.github.com/repos/RyDroid/check/tags","blobs_url":"https://api.github.com/repos/RyDroid/check/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RyDroid/check/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RyDroid/check/git/refs{/sha}","trees_url":"https://api.github.com/repos/RyDroid/check/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RyDroid/check/statuses/{sha}","languages_url":"https://api.github.com/repos/RyDroid/check/languages","stargazers_url":"https://api.github.com/repos/RyDroid/check/stargazers","contributors_url":"https://api.github.com/repos/RyDroid/check/contributors","subscribers_url":"https://api.github.com/repos/RyDroid/check/subscribers","subscription_url":"https://api.github.com/repos/RyDroid/check/subscription","commits_url":"https://api.github.com/repos/RyDroid/check/commits{/sha}","git_commits_url":"https://api.github.com/repos/RyDroid/check/git/commits{/sha}","comments_url":"https://api.github.com/repos/RyDroid/check/comments{/number}","issue_comment_url":"https://api.github.com/repos/RyDroid/check/issues/comments{/number}","contents_url":"https://api.github.com/repos/RyDroid/check/contents/{+path}","compare_url":"https://api.github.com/repos/RyDroid/check/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RyDroid/check/merges","archive_url":"https://api.github.com/repos/RyDroid/check/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RyDroid/check/downloads","issues_url":"https://api.github.com/repos/RyDroid/check/issues{/number}","pulls_url":"https://api.github.com/repos/RyDroid/check/pulls{/number}","milestones_url":"https://api.github.com/repos/RyDroid/check/milestones{/number}","notifications_url":"https://api.github.com/repos/RyDroid/check/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RyDroid/check/labels{/name}","releases_url":"https://api.github.com/repos/RyDroid/check/releases{/id}","deployments_url":"https://api.github.com/repos/RyDroid/check/deployments","created_at":"2016-06-06T01:06:38Z","updated_at":"2016-06-06T01:06:39Z","pushed_at":"2016-07-01T22:10:51Z","git_url":"git://github.com/RyDroid/check.git","ssh_url":"git@github.com:RyDroid/check.git","clone_url":"https://github.com/RyDroid/check.git","svn_url":"https://github.com/RyDroid/check","homepage":null,"size":1486,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"libcheck:master","ref":"master","sha":"7c8b499ca88c5d30cbb98a56e89c9307ecc64564","user":{"login":"libcheck","id":16420628,"avatar_url":"https://avatars.githubusercontent.com/u/16420628?v=3","gravatar_id":"","url":"https://api.github.com/users/libcheck","html_url":"https://github.com/libcheck","followers_url":"https://api.github.com/users/libcheck/followers","following_url":"https://api.github.com/users/libcheck/following{/other_user}","gists_url":"https://api.github.com/users/libcheck/gists{/gist_id}","starred_url":"https://api.github.com/users/libcheck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libcheck/subscriptions","organizations_url":"https://api.github.com/users/libcheck/orgs","repos_url":"https://api.github.com/users/libcheck/repos","events_url":"https://api.github.com/users/libcheck/events{/privacy}","received_events_url":"https://api.github.com/users/libcheck/received_events","type":"Organization","site_admin":false},"repo":{"id":48520045,"name":"check","full_name":"libcheck/check","owner":{"login":"libcheck","id":16420628,"avatar_url":"https://avatars.githubusercontent.com/u/16420628?v=3","gravatar_id":"","url":"https://api.github.com/users/libcheck","html_url":"https://github.com/libcheck","followers_url":"https://api.github.com/users/libcheck/followers","following_url":"https://api.github.com/users/libcheck/following{/other_user}","gists_url":"https://api.github.com/users/libcheck/gists{/gist_id}","starred_url":"https://api.github.com/users/libcheck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libcheck/subscriptions","organizations_url":"https://api.github.com/users/libcheck/orgs","repos_url":"https://api.github.com/users/libcheck/repos","events_url":"https://api.github.com/users/libcheck/events{/privacy}","received_events_url":"https://api.github.com/users/libcheck/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/libcheck/check","description":"A unit testing framework for C","fork":false,"url":"https://api.github.com/repos/libcheck/check","forks_url":"https://api.github.com/repos/libcheck/check/forks","keys_url":"https://api.github.com/repos/libcheck/check/keys{/key_id}","collaborators_url":"https://api.github.com/repos/libcheck/check/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/libcheck/check/teams","hooks_url":"https://api.github.com/repos/libcheck/check/hooks","issue_events_url":"https://api.github.com/repos/libcheck/check/issues/events{/number}","events_url":"https://api.github.com/repos/libcheck/check/events","assignees_url":"https://api.github.com/repos/libcheck/check/assignees{/user}","branches_url":"https://api.github.com/repos/libcheck/check/branches{/branch}","tags_url":"https://api.github.com/repos/libcheck/check/tags","blobs_url":"https://api.github.com/repos/libcheck/check/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/libcheck/check/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/libcheck/check/git/refs{/sha}","trees_url":"https://api.github.com/repos/libcheck/check/git/trees{/sha}","statuses_url":"https://api.github.com/repos/libcheck/check/statuses/{sha}","languages_url":"https://api.github.com/repos/libcheck/check/languages","stargazers_url":"https://api.github.com/repos/libcheck/check/stargazers","contributors_url":"https://api.github.com/repos/libcheck/check/contributors","subscribers_url":"https://api.github.com/repos/libcheck/check/subscribers","subscription_url":"https://api.github.com/repos/libcheck/check/subscription","commits_url":"https://api.github.com/repos/libcheck/check/commits{/sha}","git_commits_url":"https://api.github.com/repos/libcheck/check/git/commits{/sha}","comments_url":"https://api.github.com/repos/libcheck/check/comments{/number}","issue_comment_url":"https://api.github.com/repos/libcheck/check/issues/comments{/number}","contents_url":"https://api.github.com/repos/libcheck/check/contents/{+path}","compare_url":"https://api.github.com/repos/libcheck/check/compare/{base}...{head}","merges_url":"https://api.github.com/repos/libcheck/check/merges","archive_url":"https://api.github.com/repos/libcheck/check/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/libcheck/check/downloads","issues_url":"https://api.github.com/repos/libcheck/check/issues{/number}","pulls_url":"https://api.github.com/repos/libcheck/check/pulls{/number}","milestones_url":"https://api.github.com/repos/libcheck/check/milestones{/number}","notifications_url":"https://api.github.com/repos/libcheck/check/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/libcheck/check/labels{/name}","releases_url":"https://api.github.com/repos/libcheck/check/releases{/id}","deployments_url":"https://api.github.com/repos/libcheck/check/deployments","created_at":"2015-12-24T02:12:22Z","updated_at":"2016-07-01T09:12:31Z","pushed_at":"2016-07-01T22:11:23Z","git_url":"git://github.com/libcheck/check.git","ssh_url":"git@github.com:libcheck/check.git","clone_url":"https://github.com/libcheck/check.git","svn_url":"https://github.com/libcheck/check","homepage":null,"size":1976,"stargazers_count":84,"watchers_count":84,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":23,"mirror_url":null,"open_issues_count":11,"forks":23,"open_issues":11,"watchers":84,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/libcheck/check/pulls/56"},"html":{"href":"https://github.com/libcheck/check/pull/56"},"issue":{"href":"https://api.github.com/repos/libcheck/check/issues/56"},"comments":{"href":"https://api.github.com/repos/libcheck/check/issues/56/comments"},"review_comments":{"href":"https://api.github.com/repos/libcheck/check/pulls/56/comments"},"review_comment":{"href":"https://api.github.com/repos/libcheck/check/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/libcheck/check/pulls/56/commits"},"statuses":{"href":"https://api.github.com/repos/libcheck/check/statuses/ee5b0db2618a8c378cf8b1bdac9644735b5de269"}}}}
{"actor":{"display_login":"brarcher"}}