mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
thread_win32.c: suppress warning
* thread_win32.c (native_sleep): constify local variable to suppress a false positive might-be-clobbered warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6c9fdc616a
commit
e881056fd6
1 changed files with 2 additions and 8 deletions
|
@ -301,14 +301,8 @@ rb_w32_Sleep(unsigned long msec)
|
||||||
static void
|
static void
|
||||||
native_sleep(rb_thread_t *th, struct timeval *tv)
|
native_sleep(rb_thread_t *th, struct timeval *tv)
|
||||||
{
|
{
|
||||||
DWORD msec;
|
const DWORD msec = (tv) ?
|
||||||
|
(DWORD)(tv->tv_sec * 1000 + tv->tv_usec / 1000) : INFINITE;
|
||||||
if (tv) {
|
|
||||||
msec = tv->tv_sec * 1000 + tv->tv_usec / 1000;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
msec = INFINITE;
|
|
||||||
}
|
|
||||||
|
|
||||||
GVL_UNLOCK_BEGIN();
|
GVL_UNLOCK_BEGIN();
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue