diff options
author | Patrick Steinhardt <ps@pks.im> | 2016-08-16 11:43:10 +0200 |
---|---|---|
committer | Patrick Steinhardt <ps@pks.im> | 2016-10-10 09:04:42 +0200 |
commit | fc29391950df72222be29cb6b510cc119d65e150 (patch) | |
tree | 8ec312f70b94c6f455b3b48e347274cde5c63311 | |
parent | 5c2a8361d779477b4d3474c660157bd62e750fe2 (diff) | |
download | libgit2-fc29391950df72222be29cb6b510cc119d65e150.tar.gz |
examples: add: fix type casting warning
-rw-r--r-- | examples/add.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/examples/add.c b/examples/add.c index 0101ab9ae..e5849892e 100644 --- a/examples/add.c +++ b/examples/add.c @@ -75,15 +75,14 @@ int print_matched_cb(const char *path, const char *matched_pathspec, void *paylo { struct print_payload p = *(struct print_payload*)(payload); int ret; - git_status_t status; + unsigned status; (void)matched_pathspec; - if (git_status_file((unsigned int*)(&status), p.repo, path)) { - return -1; //abort + if (git_status_file(&status, p.repo, path)) { + return -1; } - if (status & GIT_STATUS_WT_MODIFIED || - status & GIT_STATUS_WT_NEW) { + if (status & GIT_STATUS_WT_MODIFIED || status & GIT_STATUS_WT_NEW) { printf("add '%s'\n", path); ret = 0; } else { |