mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-29 18:38:58 +00:00
fix below issues on mingw:
1. compile warning: D:\libgit2.git\src\win32\posix_w32.c: In function 'p_open': D:\libgit2.git\src\win32\posix_w32.c:235:10: warning: 'mode_t' is promoted to 'int' when passed through '...' [enabled by default] D:\libgit2.git\src\win32\posix_w32.c:235:10: note: (so you should pass 'int' not 'mode_t' to 'va_arg') D:\libgit2.git\src\win32\posix_w32.c:235:10: note: if this code is reached, the program will abort 2. test crash. 3. the above two issues are same root cause. please see http://www.eskimo.com/~scs/cclass/int/sx11c.html
This commit is contained in:
parent
9311423c34
commit
dfa0b65c69
@ -232,7 +232,7 @@ int p_open(const char *path, int flags, ...)
|
|||||||
va_list arg_list;
|
va_list arg_list;
|
||||||
|
|
||||||
va_start(arg_list, flags);
|
va_start(arg_list, flags);
|
||||||
mode = va_arg(arg_list, mode_t);
|
mode = (mode_t)va_arg(arg_list, int);
|
||||||
va_end(arg_list);
|
va_end(arg_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user