GitHub PullRequestEvent at 2014-04-10 16:17:46
Repository: YapDatabase
Actor: robbiehanson
Payload: {"action":"closed","number":68,"pull_request":{"url":"https://api.github.com/repos/yaptv/YapDatabase/pulls/68","id":14597671,"html_url":"https://github.com/yaptv/YapDatabase/pull/68","diff_url":"https://github.com/yaptv/YapDatabase/pull/68.diff","patch_url":"https://github.com/yaptv/YapDatabase/pull/68.patch","issue_url":"https://api.github.com/repos/yaptv/YapDatabase/issues/68","number":68,"state":"closed","title":"Fixed Xcode analyzer issues","user":{"login":"choefele","id":3195446,"avatar_url":"https://avatars.githubusercontent.com/u/3195446?","gravatar_id":"ae2cc3279f2c24525c0dcae7063834d3","url":"https://api.github.com/users/choefele","html_url":"https://github.com/choefele","followers_url":"https://api.github.com/users/choefele/followers","following_url":"https://api.github.com/users/choefele/following{/other_user}","gists_url":"https://api.github.com/users/choefele/gists{/gist_id}","starred_url":"https://api.github.com/users/choefele/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/choefele/subscriptions","organizations_url":"https://api.github.com/users/choefele/orgs","repos_url":"https://api.github.com/users/choefele/repos","events_url":"https://api.github.com/users/choefele/events{/privacy}","received_events_url":"https://api.github.com/users/choefele/received_events","type":"User","site_admin":false},"body":"Thanks for this project. \r\n\r\nI had a look at the analyzer issues reported by Xcode:\r\n\r\n_Projects/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipTransaction.m:995:3: Value stored to 'srcCollection' is never read_\r\n\r\n`srcCollection` defaulted to `@\"\"` after it was used the first time, so I moved it to the top of the method. Often, the callers of `findChangesMatchingName:sourceKey:collection:rowid:destinationFilePath:` will also default initialize the collection name, but it looked safest to keep it in this method as well. Alternatively, you might want to assert that `srcCollection` is not `nil`.\r\n\r\n_Projects/YapDatabase/YapDatabase/Extensions/Views/YapDatabaseViewTransaction.m:2359:9: Access to instance variable 'count' results in a dereference of a null pointer (loaded from variable 'pageMetadata')_\r\n\r\nI added an extra check to not execute the `while` loop if `pageMetadata` is `nil`. I also removed the code to set `pageMetadata` to `nil` because this is the default for ARC.\r\n\r\n_Projects/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipTransaction.m:1434:3: Branch condition evaluates to a garbage value (within a call to 'FreeYapDatabaseString')_\r\n_Projects/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipTransaction.m:1436:2: Potential leak of memory pointed to by '_dstFilePath.str'_\r\n\r\nI think this code is correct, but the analyzer seems to get confused by `[edge copy]` which might modify `edge`. For this reason, I'm now using a `BOOL` to make sure `FreeYapDatabaseString` is called when needed.\r\n\r\nPlease have a look, thanks","created_at":"2014-04-10T10:56:57Z","updated_at":"2014-04-10T16:17:46Z","closed_at":"2014-04-10T16:17:46Z","merged_at":"2014-04-10T16:17:46Z","merge_commit_sha":"1b0bf95248052cbe75925e32fe2b676fdfea9298","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/yaptv/YapDatabase/pulls/68/commits","review_comments_url":"https://api.github.com/repos/yaptv/YapDatabase/pulls/68/comments","review_comment_url":"https://api.github.com/repos/yaptv/YapDatabase/pulls/comments/{number}","comments_url":"https://api.github.com/repos/yaptv/YapDatabase/issues/68/comments","statuses_url":"https://api.github.com/repos/yaptv/YapDatabase/statuses/c33266dac0be0795be7d9cec6122fab7bcb77e59","head":{"label":"choefele:master","ref":"master","sha":"c33266dac0be0795be7d9cec6122fab7bcb77e59","user":{"login":"choefele","id":3195446,"avatar_url":"https://avatars.githubusercontent.com/u/3195446?","gravatar_id":"ae2cc3279f2c24525c0dcae7063834d3","url":"https://api.github.com/users/choefele","html_url":"https://github.com/choefele","followers_url":"https://api.github.com/users/choefele/followers","following_url":"https://api.github.com/users/choefele/following{/other_user}","gists_url":"https://api.github.com/users/choefele/gists{/gist_id}","starred_url":"https://api.github.com/users/choefele/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/choefele/subscriptions","organizations_url":"https://api.github.com/users/choefele/orgs","repos_url":"https://api.github.com/users/choefele/repos","events_url":"https://api.github.com/users/choefele/events{/privacy}","received_events_url":"https://api.github.com/users/choefele/received_events","type":"User","site_admin":false},"repo":{"id":18628023,"name":"YapDatabase","full_name":"choefele/YapDatabase","owner":{"login":"choefele","id":3195446,"avatar_url":"https://avatars.githubusercontent.com/u/3195446?","gravatar_id":"ae2cc3279f2c24525c0dcae7063834d3","url":"https://api.github.com/users/choefele","html_url":"https://github.com/choefele","followers_url":"https://api.github.com/users/choefele/followers","following_url":"https://api.github.com/users/choefele/following{/other_user}","gists_url":"https://api.github.com/users/choefele/gists{/gist_id}","starred_url":"https://api.github.com/users/choefele/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/choefele/subscriptions","organizations_url":"https://api.github.com/users/choefele/orgs","repos_url":"https://api.github.com/users/choefele/repos","events_url":"https://api.github.com/users/choefele/events{/privacy}","received_events_url":"https://api.github.com/users/choefele/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/choefele/YapDatabase","description":"YapDatabase layer","fork":true,"url":"https://api.github.com/repos/choefele/YapDatabase","forks_url":"https://api.github.com/repos/choefele/YapDatabase/forks","keys_url":"https://api.github.com/repos/choefele/YapDatabase/keys{/key_id}","collaborators_url":"https://api.github.com/repos/choefele/YapDatabase/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/choefele/YapDatabase/teams","hooks_url":"https://api.github.com/repos/choefele/YapDatabase/hooks","issue_events_url":"https://api.github.com/repos/choefele/YapDatabase/issues/events{/number}","events_url":"https://api.github.com/repos/choefele/YapDatabase/events","assignees_url":"https://api.github.com/repos/choefele/YapDatabase/assignees{/user}","branches_url":"https://api.github.com/repos/choefele/YapDatabase/branches{/branch}","tags_url":"https://api.github.com/repos/choefele/YapDatabase/tags","blobs_url":"https://api.github.com/repos/choefele/YapDatabase/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/choefele/YapDatabase/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/choefele/YapDatabase/git/refs{/sha}","trees_url":"https://api.github.com/repos/choefele/YapDatabase/git/trees{/sha}","statuses_url":"https://api.github.com/repos/choefele/YapDatabase/statuses/{sha}","languages_url":"https://api.github.com/repos/choefele/YapDatabase/languages","stargazers_url":"https://api.github.com/repos/choefele/YapDatabase/stargazers","contributors_url":"https://api.github.com/repos/choefele/YapDatabase/contributors","subscribers_url":"https://api.github.com/repos/choefele/YapDatabase/subscribers","subscription_url":"https://api.github.com/repos/choefele/YapDatabase/subscription","commits_url":"https://api.github.com/repos/choefele/YapDatabase/commits{/sha}","git_commits_url":"https://api.github.com/repos/choefele/YapDatabase/git/commits{/sha}","comments_url":"https://api.github.com/repos/choefele/YapDatabase/comments{/number}","issue_comment_url":"https://api.github.com/repos/choefele/YapDatabase/issues/comments/{number}","contents_url":"https://api.github.com/repos/choefele/YapDatabase/contents/{+path}","compare_url":"https://api.github.com/repos/choefele/YapDatabase/compare/{base}...{head}","merges_url":"https://api.github.com/repos/choefele/YapDatabase/merges","archive_url":"https://api.github.com/repos/choefele/YapDatabase/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/choefele/YapDatabase/downloads","issues_url":"https://api.github.com/repos/choefele/YapDatabase/issues{/number}","pulls_url":"https://api.github.com/repos/choefele/YapDatabase/pulls{/number}","milestones_url":"https://api.github.com/repos/choefele/YapDatabase/milestones{/number}","notifications_url":"https://api.github.com/repos/choefele/YapDatabase/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/choefele/YapDatabase/labels{/name}","releases_url":"https://api.github.com/repos/choefele/YapDatabase/releases{/id}","created_at":"2014-04-10T07:37:39Z","updated_at":"2014-04-10T16:17:46Z","pushed_at":"2014-04-10T10:41:40Z","git_url":"git://github.com/choefele/YapDatabase.git","ssh_url":"git@github.com:choefele/YapDatabase.git","clone_url":"https://github.com/choefele/YapDatabase.git","svn_url":"https://github.com/choefele/YapDatabase","homepage":null,"size":11296,"stargazers_count":0,"watchers_count":0,"language":"Objective-C","has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master","master_branch":"master"}},"base":{"label":"yaptv:master","ref":"master","sha":"aaeaf759f61c98777bad43a3b01bf6fc27782a16","user":{"login":"yaptv","id":321894,"avatar_url":"https://avatars.githubusercontent.com/u/321894?","gravatar_id":"4cca8eef7602c1cae60f6b37e95f0ee4","url":"https://api.github.com/users/yaptv","html_url":"https://github.com/yaptv","followers_url":"https://api.github.com/users/yaptv/followers","following_url":"https://api.github.com/users/yaptv/following{/other_user}","gists_url":"https://api.github.com/users/yaptv/gists{/gist_id}","starred_url":"https://api.github.com/users/yaptv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yaptv/subscriptions","organizations_url":"https://api.github.com/users/yaptv/orgs","repos_url":"https://api.github.com/users/yaptv/repos","events_url":"https://api.github.com/users/yaptv/events{/privacy}","received_events_url":"https://api.github.com/users/yaptv/received_events","type":"Organization","site_admin":false},"repo":{"id":7262245,"name":"YapDatabase","full_name":"yaptv/YapDatabase","owner":{"login":"yaptv","id":321894,"avatar_url":"https://avatars.githubusercontent.com/u/321894?","gravatar_id":"4cca8eef7602c1cae60f6b37e95f0ee4","url":"https://api.github.com/users/yaptv","html_url":"https://github.com/yaptv","followers_url":"https://api.github.com/users/yaptv/followers","following_url":"https://api.github.com/users/yaptv/following{/other_user}","gists_url":"https://api.github.com/users/yaptv/gists{/gist_id}","starred_url":"https://api.github.com/users/yaptv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yaptv/subscriptions","organizations_url":"https://api.github.com/users/yaptv/orgs","repos_url":"https://api.github.com/users/yaptv/repos","events_url":"https://api.github.com/users/yaptv/events{/privacy}","received_events_url":"https://api.github.com/users/yaptv/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/yaptv/YapDatabase","description":"YapDatabase layer","fork":false,"url":"https://api.github.com/repos/yaptv/YapDatabase","forks_url":"https://api.github.com/repos/yaptv/YapDatabase/forks","keys_url":"https://api.github.com/repos/yaptv/YapDatabase/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yaptv/YapDatabase/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yaptv/YapDatabase/teams","hooks_url":"https://api.github.com/repos/yaptv/YapDatabase/hooks","issue_events_url":"https://api.github.com/repos/yaptv/YapDatabase/issues/events{/number}","events_url":"https://api.github.com/repos/yaptv/YapDatabase/events","assignees_url":"https://api.github.com/repos/yaptv/YapDatabase/assignees{/user}","branches_url":"https://api.github.com/repos/yaptv/YapDatabase/branches{/branch}","tags_url":"https://api.github.com/repos/yaptv/YapDatabase/tags","blobs_url":"https://api.github.com/repos/yaptv/YapDatabase/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yaptv/YapDatabase/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yaptv/YapDatabase/git/refs{/sha}","trees_url":"https://api.github.com/repos/yaptv/YapDatabase/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yaptv/YapDatabase/statuses/{sha}","languages_url":"https://api.github.com/repos/yaptv/YapDatabase/languages","stargazers_url":"https://api.github.com/repos/yaptv/YapDatabase/stargazers","contributors_url":"https://api.github.com/repos/yaptv/YapDatabase/contributors","subscribers_url":"https://api.github.com/repos/yaptv/YapDatabase/subscribers","subscription_url":"https://api.github.com/repos/yaptv/YapDatabase/subscription","commits_url":"https://api.github.com/repos/yaptv/YapDatabase/commits{/sha}","git_commits_url":"https://api.github.com/repos/yaptv/YapDatabase/git/commits{/sha}","comments_url":"https://api.github.com/repos/yaptv/YapDatabase/comments{/number}","issue_comment_url":"https://api.github.com/repos/yaptv/YapDatabase/issues/comments/{number}","contents_url":"https://api.github.com/repos/yaptv/YapDatabase/contents/{+path}","compare_url":"https://api.github.com/repos/yaptv/YapDatabase/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yaptv/YapDatabase/merges","archive_url":"https://api.github.com/repos/yaptv/YapDatabase/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yaptv/YapDatabase/downloads","issues_url":"https://api.github.com/repos/yaptv/YapDatabase/issues{/number}","pulls_url":"https://api.github.com/repos/yaptv/YapDatabase/pulls{/number}","milestones_url":"https://api.github.com/repos/yaptv/YapDatabase/milestones{/number}","notifications_url":"https://api.github.com/repos/yaptv/YapDatabase/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yaptv/YapDatabase/labels{/name}","releases_url":"https://api.github.com/repos/yaptv/YapDatabase/releases{/id}","created_at":"2012-12-20T18:26:29Z","updated_at":"2014-04-10T16:17:46Z","pushed_at":"2014-04-10T16:17:46Z","git_url":"git://github.com/yaptv/YapDatabase.git","ssh_url":"git@github.com:yaptv/YapDatabase.git","clone_url":"https://github.com/yaptv/YapDatabase.git","svn_url":"https://github.com/yaptv/YapDatabase","homepage":null,"size":11296,"stargazers_count":778,"watchers_count":778,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":43,"mirror_url":null,"open_issues_count":7,"forks":43,"open_issues":7,"watchers":778,"default_branch":"master","master_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/yaptv/YapDatabase/pulls/68"},"html":{"href":"https://github.com/yaptv/YapDatabase/pull/68"},"issue":{"href":"https://api.github.com/repos/yaptv/YapDatabase/issues/68"},"comments":{"href":"https://api.github.com/repos/yaptv/YapDatabase/issues/68/comments"},"review_comments":{"href":"https://api.github.com/repos/yaptv/YapDatabase/pulls/68/comments"},"review_comment":{"href":"https://api.github.com/repos/yaptv/YapDatabase/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/yaptv/YapDatabase/pulls/68/commits"},"statuses":{"href":"https://api.github.com/repos/yaptv/YapDatabase/statuses/c33266dac0be0795be7d9cec6122fab7bcb77e59"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"robbiehanson","id":304604,"avatar_url":"https://avatars.githubusercontent.com/u/304604?","gravatar_id":"26826b55dce2a1b8ee0ddc7293d8b08e","url":"https://api.github.com/users/robbiehanson","html_url":"https://github.com/robbiehanson","followers_url":"https://api.github.com/users/robbiehanson/followers","following_url":"https://api.github.com/users/robbiehanson/following{/other_user}","gists_url":"https://api.github.com/users/robbiehanson/gists{/gist_id}","starred_url":"https://api.github.com/users/robbiehanson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robbiehanson/subscriptions","organizations_url":"https://api.github.com/users/robbiehanson/orgs","repos_url":"https://api.github.com/users/robbiehanson/repos","events_url":"https://api.github.com/users/robbiehanson/events{/privacy}","received_events_url":"https://api.github.com/users/robbiehanson/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"commits":3,"additions":8,"deletions":7,"changed_files":2}}