mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-30 00:04:03 +00:00
examples: add: fix type casting warning
This commit is contained in:
parent
5c2a8361d7
commit
fc29391950
@ -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);
|
struct print_payload p = *(struct print_payload*)(payload);
|
||||||
int ret;
|
int ret;
|
||||||
git_status_t status;
|
unsigned status;
|
||||||
(void)matched_pathspec;
|
(void)matched_pathspec;
|
||||||
|
|
||||||
if (git_status_file((unsigned int*)(&status), p.repo, path)) {
|
if (git_status_file(&status, p.repo, path)) {
|
||||||
return -1; //abort
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (status & GIT_STATUS_WT_MODIFIED ||
|
if (status & GIT_STATUS_WT_MODIFIED || status & GIT_STATUS_WT_NEW) {
|
||||||
status & GIT_STATUS_WT_NEW) {
|
|
||||||
printf("add '%s'\n", path);
|
printf("add '%s'\n", path);
|
||||||
ret = 0;
|
ret = 0;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user