* cygheap.cc (_csbrk): More left coercion cleanup.

* fhandler_tty.cc (fhandler_tty_slave::read): Ditto.
(fhandler_tty_slave::write): Ditto.
* fhandler_windows.cc (fhandler_windows::read): Ditto.
* heap.cc (sbrk): Ditto.
This commit is contained in:
Christopher Faylor 2003-09-07 18:27:54 +00:00
parent ed2287adcd
commit bd8938985e
5 changed files with 15 additions and 7 deletions

View file

@ -1,3 +1,11 @@
2003-09-07 Christopher Faylor <cgf@redhat.com>
* cygheap.cc (_csbrk): More left coercion cleanup.
* fhandler_tty.cc (fhandler_tty_slave::read): Ditto.
(fhandler_tty_slave::write): Ditto.
* fhandler_windows.cc (fhandler_windows::read): Ditto.
* heap.cc (sbrk): Ditto.
2003-09-07 Pierre Humblet <pierre.humblet@ieee.org>
* signal.cc (nanosleep): Improve test for valid values. Round delay up

View file

@ -179,14 +179,14 @@ _csbrk (int sbs)
{
void *prebrk = cygheap_max;
void *prebrka = pagetrunc (prebrk);
(char *) cygheap_max += sbs;
cygheap_max = (char *) cygheap_max + sbs;
if (!sbs || (prebrk != prebrka && prebrka == pagetrunc (cygheap_max)))
/* nothing to do */;
else if (!VirtualAlloc (prebrk, (DWORD) sbs, MEM_COMMIT, PAGE_READWRITE))
{
malloc_printf ("couldn't commit memory for cygwin heap, %E");
__seterrno ();
(char *) cygheap_max -= sbs;
cygheap_max = (char *) cygheap_max - sbs;
return NULL;
}

View file

@ -762,7 +762,7 @@ fhandler_tty_slave::read (void *ptr, size_t& len)
if (!vmin && !time_to_wait)
{
ReleaseMutex (input_mutex);
(ssize_t) len = bytes_in_pipe;
len = (size_t) bytes_in_pipe;
return;
}
@ -842,7 +842,7 @@ fhandler_tty_slave::read (void *ptr, size_t& len)
waiter = time_to_wait;
}
termios_printf ("%d=read(%x, %d)", totalread, ptr, len);
(ssize_t) len = totalread;
len = (size_t) totalread;
return;
}
@ -1153,7 +1153,7 @@ fhandler_pty_master::write (const void *ptr, size_t len)
void __stdcall
fhandler_pty_master::read (void *ptr, size_t& len)
{
(ssize_t) len = process_slave_output ((char *) ptr, len, pktmode);
len = (size_t) process_slave_output ((char *) ptr, len, pktmode);
return;
}

View file

@ -90,7 +90,7 @@ fhandler_windows::read (void *buf, size_t& len)
return;
}
(ssize_t) len = GetMessage (ptr, hWnd_, 0, 0);
len = (size_t) GetMessage (ptr, hWnd_, 0, 0);
if ((ssize_t) len == -1)
__seterrno ();

View file

@ -146,7 +146,7 @@ sbrk (int n)
|| VirtualAlloc (cygheap->user_heap.top, newbrksize = commitbytes, MEM_RESERVE, PAGE_NOACCESS))
&& VirtualAlloc (cygheap->user_heap.top, commitbytes, MEM_COMMIT, PAGE_READWRITE) != NULL)
{
(char *) cygheap->user_heap.max += pround (newbrksize);
cygheap->user_heap.max = (char *) cygheap->user_heap.max + pround (newbrksize);
goto good;
}