Skip to content

Commit

Permalink
* thread.c: fixed types.
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23373 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
nobu committed May 9, 2009
1 parent f4be2ca commit 46be98a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ thread_start_func_2(rb_thread_t *th, VALUE *stack_start, VALUE *register_stack_s
th->local_lfp = proc->block.lfp;
th->local_svar = Qnil;
th->value = rb_vm_invoke_proc(th, proc, proc->block.self,
RARRAY_LEN(args), RARRAY_PTR(args), 0);
(int)RARRAY_LEN(args), RARRAY_PTR(args), 0);
}
else {
th->value = (*th->first_func)((void *)th->first_args);
Expand Down Expand Up @@ -750,7 +750,7 @@ double2timeval(double d)
time.tv_sec = (int)d;
time.tv_usec = (int)((d - (int)d) * 1e6);
if (time.tv_usec < 0) {
time.tv_usec += (long)1e6;
time.tv_usec += (int)1e6;
time.tv_sec -= 1;
}
return time;
Expand Down Expand Up @@ -2177,8 +2177,8 @@ rb_fd_zero(rb_fdset_t *fds)
static void
rb_fd_resize(int n, rb_fdset_t *fds)
{
int m = howmany(n + 1, NFDBITS) * sizeof(fd_mask);
int o = howmany(fds->maxfd, NFDBITS) * sizeof(fd_mask);
size_t m = howmany(n + 1, NFDBITS) * sizeof(fd_mask);
size_t o = howmany(fds->maxfd, NFDBITS) * sizeof(fd_mask);

if (m < sizeof(fd_set)) m = sizeof(fd_set);
if (o < sizeof(fd_set)) o = sizeof(fd_set);
Expand Down Expand Up @@ -2214,7 +2214,7 @@ rb_fd_isset(int n, const rb_fdset_t *fds)
void
rb_fd_copy(rb_fdset_t *dst, const fd_set *src, int max)
{
int size = howmany(max, NFDBITS) * sizeof(fd_mask);
size_t size = howmany(max, NFDBITS) * sizeof(fd_mask);

if (size < sizeof(fd_set)) size = sizeof(fd_set);
dst->maxfd = max;
Expand Down Expand Up @@ -2414,7 +2414,7 @@ do_select(int n, fd_set *read, fd_set *write, fd_set *except,
double d = limit - timeofday();

wait_rest.tv_sec = (unsigned int)d;
wait_rest.tv_usec = (long)((d-(double)wait_rest.tv_sec)*1e6);
wait_rest.tv_usec = (int)((d-(double)wait_rest.tv_sec)*1e6);
if (wait_rest.tv_sec < 0) wait_rest.tv_sec = 0;
if (wait_rest.tv_usec < 0) wait_rest.tv_usec = 0;
}
Expand Down

0 comments on commit 46be98a

Please sign in to comment.