1
0
Fork 0
mirror of https://git.tukaani.org/xz.git synced 2024-04-04 12:36:23 +02:00

Silence two compiler warnings on DOS-like systems.

This commit is contained in:
Lasse Collin 2010-01-27 16:42:11 +02:00
parent b063cc34a3
commit 5574d64e03
2 changed files with 8 additions and 1 deletions

View file

@ -23,7 +23,11 @@
extern void extern void
tuklib_open_stdxxx(int err_status) tuklib_open_stdxxx(int err_status)
{ {
#ifndef TUKLIB_DOSLIKE #ifdef TUKLIB_DOSLIKE
// Do nothing, just silence warnings.
(void)err_status;
#else
for (int i = 0; i <= 2; ++i) { for (int i = 0; i <= 2; ++i) {
// We use fcntl() to check if the file descriptor is open. // We use fcntl() to check if the file descriptor is open.
if (fcntl(i, F_GETFD) == -1 && errno == EBADF) { if (fcntl(i, F_GETFD) == -1 && errno == EBADF) {

View file

@ -327,6 +327,9 @@ io_open_src(file_pair *pair)
return true; return true;
} }
} }
#else
// Avoid warnings.
(void)follow_symlinks;
#endif #endif
// Try to open the file. If we are accepting non-regular files, // Try to open the file. If we are accepting non-regular files,