Fix some compiler warnings in Irrlicht

This commit is contained in:
Timothy Hamlett
2014-11-30 22:29:52 -06:00
parent 211e698a29
commit d95f7835fd
3 changed files with 6 additions and 6 deletions

View File

@@ -236,7 +236,7 @@ local gzFile gz_open(path, fd, mode)
#ifdef _WIN32
fd == -2 ? _wopen(path, oflag, 0666) :
#endif
open(path, oflag, 0666));
_open(path, oflag, 0666));
if (state->fd == -1) {
free(state->path);
free(state);

View File

@@ -27,7 +27,7 @@ local int gz_load(state, buf, len, have)
*have = 0;
do {
ret = read(state->fd, buf + *have, len - *have);
ret = _read(state->fd, buf + *have, len - *have);
if (ret <= 0)
break;
*have += ret;
@@ -583,7 +583,7 @@ int ZEXPORT gzclose_r(file)
err = state->err == Z_BUF_ERROR ? Z_BUF_ERROR : Z_OK;
gz_error(state, Z_OK, NULL);
free(state->path);
ret = close(state->fd);
ret = _close(state->fd);
free(state);
return ret ? Z_ERRNO : err;
}

View File

@@ -81,7 +81,7 @@ local int gz_comp(state, flush)
/* write directly if requested */
if (state->direct) {
got = write(state->fd, strm->next_in, strm->avail_in);
got = _write(state->fd, strm->next_in, strm->avail_in);
if (got < 0 || (unsigned)got != strm->avail_in) {
gz_error(state, Z_ERRNO, zstrerror());
return -1;
@@ -98,7 +98,7 @@ local int gz_comp(state, flush)
if (strm->avail_out == 0 || (flush != Z_NO_FLUSH &&
(flush != Z_FINISH || ret == Z_STREAM_END))) {
have = (unsigned)(strm->next_out - state->x.next);
if (have && ((got = write(state->fd, state->x.next, have)) < 0 ||
if (have && ((got = _write(state->fd, state->x.next, have)) < 0 ||
(unsigned)got != have)) {
gz_error(state, Z_ERRNO, zstrerror());
return -1;
@@ -558,7 +558,7 @@ int ZEXPORT gzclose_w(file)
}
gz_error(state, Z_OK, NULL);
free(state->path);
if (close(state->fd) == -1)
if (_close(state->fd) == -1)
ret = Z_ERRNO;
free(state);
return ret;