зеркало из https://github.com/github/ruby.git
[ruby/io-console] Suppress warnings on Windows
About unused variables and a function. https://github.com/ruby/io-console/commit/32baf54e7a
This commit is contained in:
Родитель
ad6cbc1d33
Коммит
b5ab918d0c
|
@ -311,6 +311,7 @@ ttymode_callback(VALUE args)
|
||||||
return argp->func(argp->io, argp->farg);
|
return argp->func(argp->io, argp->farg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !defined _WIN32
|
||||||
static VALUE
|
static VALUE
|
||||||
ttymode_with_io(VALUE io, VALUE (*func)(VALUE, VALUE), VALUE farg, void (*setter)(conmode *, void *), void *arg)
|
ttymode_with_io(VALUE io, VALUE (*func)(VALUE, VALUE), VALUE farg, void (*setter)(conmode *, void *), void *arg)
|
||||||
{
|
{
|
||||||
|
@ -320,6 +321,7 @@ ttymode_with_io(VALUE io, VALUE (*func)(VALUE, VALUE), VALUE farg, void (*setter
|
||||||
cargs.farg = farg;
|
cargs.farg = farg;
|
||||||
return ttymode(io, ttymode_callback, (VALUE)&cargs, setter, arg);
|
return ttymode(io, ttymode_callback, (VALUE)&cargs, setter, arg);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* call-seq:
|
* call-seq:
|
||||||
|
@ -895,7 +897,7 @@ console_erase_line(VALUE io, VALUE val)
|
||||||
HANDLE h;
|
HANDLE h;
|
||||||
rb_console_size_t ws;
|
rb_console_size_t ws;
|
||||||
COORD *pos = &ws.dwCursorPosition;
|
COORD *pos = &ws.dwCursorPosition;
|
||||||
DWORD written, w;
|
DWORD w;
|
||||||
int mode = mode_in_range(val, 2, "line erase");
|
int mode = mode_in_range(val, 2, "line erase");
|
||||||
|
|
||||||
GetOpenFile(io, fptr);
|
GetOpenFile(io, fptr);
|
||||||
|
@ -927,7 +929,7 @@ console_erase_screen(VALUE io, VALUE val)
|
||||||
HANDLE h;
|
HANDLE h;
|
||||||
rb_console_size_t ws;
|
rb_console_size_t ws;
|
||||||
COORD *pos = &ws.dwCursorPosition;
|
COORD *pos = &ws.dwCursorPosition;
|
||||||
DWORD written, w;
|
DWORD w;
|
||||||
int mode = mode_in_range(val, 3, "screen erase");
|
int mode = mode_in_range(val, 3, "screen erase");
|
||||||
|
|
||||||
GetOpenFile(io, fptr);
|
GetOpenFile(io, fptr);
|
||||||
|
@ -966,7 +968,6 @@ console_scroll(VALUE io, int line)
|
||||||
rb_io_t *fptr;
|
rb_io_t *fptr;
|
||||||
HANDLE h;
|
HANDLE h;
|
||||||
rb_console_size_t ws;
|
rb_console_size_t ws;
|
||||||
COORD *pos = &ws.dwCursorPosition;
|
|
||||||
|
|
||||||
GetOpenFile(io, fptr);
|
GetOpenFile(io, fptr);
|
||||||
h = (HANDLE)rb_w32_get_osfhandle(GetWriteFD(fptr));
|
h = (HANDLE)rb_w32_get_osfhandle(GetWriteFD(fptr));
|
||||||
|
|
Загрузка…
Ссылка в новой задаче