Fix compile warnings

This commit is contained in:
Marek Marczykowski-Górecki 2014-06-26 03:10:25 +02:00
parent 020f341f98
commit 680c36934e
2 changed files with 6 additions and 4 deletions

View File

@ -43,7 +43,7 @@ void do_fork_exec(const char *cmdline, int *pid, int *stdin_fd, int *stdout_fd,
int *stderr_fd); int *stderr_fd);
void wait_for_vchan_or_argfd(libvchan_t *vchan, int max, fd_set * rdset, fd_set * wrset); void wait_for_vchan_or_argfd(libvchan_t *vchan, int max, fd_set * rdset, fd_set * wrset);
int read_vchan_all(libvchan_t *vchan, void *data, size_t size); int read_vchan_all(libvchan_t *vchan, void *data, size_t size);
int write_vchan_all(libvchan_t *vchan, void *data, size_t size); int write_vchan_all(libvchan_t *vchan, const void *data, size_t size);
int read_all(int fd, void *buf, int size); int read_all(int fd, void *buf, int size);
int write_all(int fd, const void *buf, int size); int write_all(int fd, const void *buf, int size);
void fix_fds(int fdin, int fdout, int fderr); void fix_fds(int fdin, int fdout, int fderr);

View File

@ -75,8 +75,9 @@ void wait_for_vchan_or_argfd(libvchan_t *ctrl, int max, fd_set * rdset, fd_set *
while (wait_for_vchan_or_argfd_once(ctrl, max, rdset, wrset) == 0); while (wait_for_vchan_or_argfd_once(ctrl, max, rdset, wrset) == 0);
} }
int write_vchan_all(libvchan_t *vchan, void *data, size_t size) { int write_vchan_all(libvchan_t *vchan, const void *data, size_t size) {
int pos, ret; size_t pos;
int ret;
pos = 0; pos = 0;
while (pos < size) { while (pos < size) {
@ -89,7 +90,8 @@ int write_vchan_all(libvchan_t *vchan, void *data, size_t size) {
} }
int read_vchan_all(libvchan_t *vchan, void *data, size_t size) { int read_vchan_all(libvchan_t *vchan, void *data, size_t size) {
int pos, ret; size_t pos;
int ret;
pos = 0; pos = 0;
while (pos < size) { while (pos < size) {