Skip to content

Commit fc29391

Browse files
committed
examples: add: fix type casting warning
1 parent 5c2a836 commit fc29391

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

examples/add.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,14 @@ int print_matched_cb(const char *path, const char *matched_pathspec, void *paylo
7575
{
7676
struct print_payload p = *(struct print_payload*)(payload);
7777
int ret;
78-
git_status_t status;
78+
unsigned status;
7979
(void)matched_pathspec;
8080

81-
if (git_status_file((unsigned int*)(&status), p.repo, path)) {
82-
return -1; //abort
81+
if (git_status_file(&status, p.repo, path)) {
82+
return -1;
8383
}
8484

85-
if (status & GIT_STATUS_WT_MODIFIED ||
86-
status & GIT_STATUS_WT_NEW) {
85+
if (status & GIT_STATUS_WT_MODIFIED || status & GIT_STATUS_WT_NEW) {
8786
printf("add '%s'\n", path);
8887
ret = 0;
8988
} else {

0 commit comments

Comments
 (0)