+2005-07-06 Christopher Faylor <cgf@timesys.com>
+
+ Eliminate (void) cast on standalone function calls throughout.
+
2005-07-05 Christopher Faylor <cgf@timesys.com>
* dcrt0.cc (cygwin_exit): Mark as "noreturn".
#endif
cygheap_max = cygheap;
- (void) _csbrk (sizeof (*cygheap));
+ _csbrk (sizeof (*cygheap));
}
if (!cygheap->fdtab)
cygheap->fdtab.init ();
cfree (void *s)
{
assert (!inheap (s));
- (void) _cfree (tocygheap (s));
+ _cfree (tocygheap (s));
MALLOC_CHECK;
}
if (!inuse)
goto force_notterminated;
- (void) TerminateThread (h, 0);
- (void) WaitForSingleObject (h, INFINITE);
+ TerminateThread (h, 0);
+ WaitForSingleObject (h, INFINITE);
CloseHandle (h);
if (!inuse || exiting)
MEMORY_BASIC_INFORMATION m;
memset (&m, 0, sizeof (m));
- (void) VirtualQuery (stack_ptr, &m, sizeof m);
+ VirtualQuery (stack_ptr, &m, sizeof m);
if (!m.RegionSize)
system_printf ("m.RegionSize 0? stack_ptr %p", stack_ptr);
/* Lower our priority and give priority to the read thread */
HANDLE hth = GetCurrentThread ();
LONG prio = GetThreadPriority (hth);
- (void) ::SetThreadPriority (hth, THREAD_PRIORITY_BELOW_NORMAL);
+ ::SetThreadPriority (hth, THREAD_PRIORITY_BELOW_NORMAL);
HANDLE w4[2];
unsigned n = 2;
/* WAIT_OBJECT_0 means that the thread successfully read something,
so wait for the cygthread to "terminate". */
if (res == WAIT_OBJECT_0)
- (void) WaitForSingleObject (*this, INFINITE);
+ WaitForSingleObject (*this, INFINITE);
else
{
/* Thread didn't terminate on its own, so maybe we have to
set_sig_errno (EINTR);
thread_was_reset = true;
}
- (void) ::SetThreadPriority (hth, prio);
+ ::SetThreadPriority (hth, prio);
}
thread_printf ("%s returns %d, id %p", sigwait ? "WFMO" : "WFSO",
{
ResetEvent (*this);
/* Mark the thread as available by setting inuse to zero */
- (void) InterlockedExchange (&inuse, 0);
+ InterlockedExchange (&inuse, 0);
}
}
return signalled;
bool SetThreadPriority (int nPriority) {return ::SetThreadPriority (h, nPriority);}
void zap_h ()
{
- (void) CloseHandle (h);
+ CloseHandle (h);
h = NULL;
}
};
if (wincap.has_security ())
OpenProcessToken (hMainProc, MAXIMUM_ALLOWED, &hProcToken);
- (void) SetErrorMode (SEM_FAILCRITICALERRORS);
+ SetErrorMode (SEM_FAILCRITICALERRORS);
device::init ();
do_global_ctors (&__CTOR_LIST__, 1);
system_printf ("internal error: sync_startup not called at start. Expect signal problems.");
else
{
- (void) WaitForSingleObject (sync_startup, INFINITE);
+ WaitForSingleObject (sync_startup, INFINITE);
CloseHandle (sync_startup);
}
strcat (buf, "\n");
int len = strlen (buf);
DWORD done;
- (void) WriteFile (GetStdHandle (STD_ERROR_HANDLE), buf, len, &done, 0);
+ WriteFile (GetStdHandle (STD_ERROR_HANDLE), buf, len, &done, 0);
/* Make sure that the message shows up on the screen, too, since this is
a serious error. */
FILE_SHARE_WRITE | FILE_SHARE_WRITE,
&sec_none, OPEN_EXISTING, 0, 0);
if (h != INVALID_HANDLE_VALUE)
- (void) WriteFile (h, buf, len, &done, 0);
+ WriteFile (h, buf, len, &done, 0);
}
/* We are going down without mercy. Make sure we reset
our process_state. */
sigproc_terminate ();
#ifdef DEBUGGING
- (void) try_to_debug ();
+ try_to_debug ();
#endif
myself.exit (1);
}
#include "dlmalloc.h"
#define MALLOC_CHECK ({\
debug_printf ("checking malloc pool");\
- (void) mallinfo ();\
+ mallinfo ();\
})
#endif
if (in_native)
{
native = (char *) realloc (native, namelen + 1 + strlen (in_native));
- (void) strcpy (native, name);
- (void) strcpy (native + namelen, in_native);
+ strcpy (native, name);
+ strcpy (native + namelen, in_native);
}
else
{
native = (char *) realloc (native, namelen + 1 + win32_len (in_posix));
- (void) strcpy (native, name);
+ strcpy (native, name);
towin32 (in_posix, native + namelen);
}
MALLOC_CHECK;
return env_dontadd;
char *s = (char *) cmalloc (HEAP_1_STR, namelen + strlen (p) + 1);
strcpy (s, name);
- (void) strcpy (s + namelen, p);
+ strcpy (s + namelen, p);
debug_printf ("using computed value for '%s'", name);
return s;
}
init_console_handler (BOOL install_handler)
{
BOOL res;
- (void) SetConsoleCtrlHandler (ctrl_c_handler, FALSE);
+ SetConsoleCtrlHandler (ctrl_c_handler, FALSE);
if (install_handler)
res = SetConsoleCtrlHandler (ctrl_c_handler, TRUE);
else if (wincap.has_null_console_handler_routine ())
/* Just set pending if thread is already suspended */
if (res)
{
- (void) ResumeThread (hth);
+ ResumeThread (hth);
break;
}
if (tls->incyg || tls->in_exception () || tls->spinning || tls->locked ())
/* We'd like to stop the main thread from executing but when we do that it
causes random, inexplicable hangs. So, instead, we set up the priority
of this thread really high so that it should do its thing and then exit. */
- (void) SetThreadPriority (hMainThread, THREAD_PRIORITY_IDLE);
- (void) SetThreadPriority (GetCurrentThread (), THREAD_PRIORITY_TIME_CRITICAL);
+ SetThreadPriority (hMainThread, THREAD_PRIORITY_IDLE);
+ SetThreadPriority (GetCurrentThread (), THREAD_PRIORITY_TIME_CRITICAL);
user_data->resourcelocks->Delete ();
user_data->resourcelocks->Init ();
}
sigproc_printf ("about to call do_exit (%x)", rc);
- (void) SetEvent (signal_arrived);
+ SetEvent (signal_arrived);
do_exit (rc);
}
ProtectHandle (tty_mutex);
mask_sync.init ("mask_sync");
windows_system_directory[0] = '\0';
- (void) GetSystemDirectory (windows_system_directory, sizeof (windows_system_directory) - 2);
+ GetSystemDirectory (windows_system_directory, sizeof (windows_system_directory) - 2);
char *end = strchr (windows_system_directory, '\0');
if (end == windows_system_directory)
api_fatal ("can't find windows system directory");
int thissig = sig;
void (*sigfunc) (int) = func;
- (void) pop ();
+ pop ();
reset_signal_arrived ();
sigset_t this_oldmask = set_process_mask_delta ();
int this_errno = saved_errno;
reset_signal_arrived ()
{
// NEEDED? WaitForSingleObject (signal_arrived, 10);
- (void) ResetEvent (signal_arrived);
+ ResetEvent (signal_arrived);
sigproc_printf ("reset signal_arrived");
if (_my_tls.stackptr > _my_tls.stack)
debug_printf ("stackptr[-1] %p", _my_tls.stackptr[-1]);
{
h = GetCurrentThread ();
prio = GetThreadPriority (h);
- (void) SetThreadPriority (h, THREAD_PRIORITY_TIME_CRITICAL);
+ SetThreadPriority (h, THREAD_PRIORITY_TIME_CRITICAL);
signal_read_state (1);
}
BOOL res = ReadFile (get_handle (), ptr, len, (DWORD *) &ulen, 0);
if (read_state)
{
signal_read_state (1);
- (void) SetThreadPriority (h, prio);
+ SetThreadPriority (h, prio);
}
if (!res)
{
void signal_read_state (LONG n)
{
- (void) ReleaseSemaphore (read_state, n, NULL);
+ ReleaseSemaphore (read_state, n, NULL);
}
void set_fs_flags (DWORD flags) { fs_flags = flags; }
void
fhandler_dev_clipboard::fixup_after_exec ()
{
- (void) close ();
+ close ();
}
void
set_console_ctty ()
{
- (void) fhandler_console::get_tty_stuff ();
+ fhandler_console::get_tty_stuff ();
}
/* Return the tty structure associated with a given tty number. If the
CHAR_INFO fill;
COORD dest;
- (void) dev_state->fillin_info (get_output_handle ());
+ dev_state->fillin_info (get_output_handle ());
sr1.Left = x1 >= 0 ? x1 : dev_state->info.dwWinSize.X - 1;
if (y1 == 0)
sr1.Top = dev_state->info.winTop;
}
return 0;
case TIOCSWINSZ:
- (void) bg_check (SIGTTOU);
+ bg_check (SIGTTOU);
return 0;
case TIOCLINUX:
if (* (int *) buf == 6)
DWORD done;
int num;
- (void) dev_state->fillin_info (get_output_handle ());
+ dev_state->fillin_info (get_output_handle ());
if (x1 < 0)
x1 = dev_state->info.dwWinSize.X - 1;
{
COORD pos;
- (void) dev_state->fillin_info (get_output_handle ());
+ dev_state->fillin_info (get_output_handle ());
if (y > dev_state->info.winBottom)
y = dev_state->info.winBottom;
else if (y < 0)
void
fhandler_console::cursor_rel (int x, int y)
{
- (void) dev_state->fillin_info (get_output_handle ());
+ dev_state->fillin_info (get_output_handle ());
x += dev_state->info.dwCursorPosition.X;
y += dev_state->info.dwCursorPosition.Y;
cursor_set (false, x, y);
pc.set_exec ();
buf->st_mode |= STD_XBITS;
}
- (void) SetFilePointer (get_handle (), cur, NULL, FILE_BEGIN);
+ SetFilePointer (get_handle (), cur, NULL, FILE_BEGIN);
}
}
}
else if (!FindNextFileA (dir->__handle, &buf))
{
DWORD lasterr = GetLastError ();
- (void) FindClose (dir->__handle);
+ FindClose (dir->__handle);
dir->__handle = INVALID_HANDLE_VALUE;
/* POSIX says you shouldn't set errno when readdir can't
find any more files; so, if another error we leave it set. */
/* We get here if `buf' contains valid data. */
if (pc.isencoded ())
- (void) fnunmunge (dir->__d_dirent->d_name, buf.cFileName);
+ fnunmunge (dir->__d_dirent->d_name, buf.cFileName);
else
strcpy (dir->__d_dirent->d_name, buf.cFileName);
{
if (dir->__handle != INVALID_HANDLE_VALUE)
{
- (void) FindClose (dir->__handle);
+ FindClose (dir->__handle);
dir->__handle = INVALID_HANDLE_VALUE;
}
dir->__d_position = 0;
const char *path = get_name ();
debug_printf ("fstat (%s)", path);
- (void) fhandler_base::fstat (buf);
+ fhandler_base::fstat (buf);
buf->st_mode = S_IFDIR | STD_RBITS | STD_XBITS;
debug_printf ("fstat (%s)", path);
path += proc_len;
- (void) fhandler_base::fstat (buf);
+ fhandler_base::fstat (buf);
buf->st_mode &= ~_IFMT & NO_W;
{
const char *path = get_name ();
int file_type = exists ();
- (void) fhandler_base::fstat (buf);
+ fhandler_base::fstat (buf);
path += proc_len + 1;
pid = atoi (path);
pinfo p (pid);
{
if (dir->__handle != INVALID_HANDLE_VALUE)
{
- (void) RegCloseKey ((HKEY) dir->__handle);
+ RegCloseKey ((HKEY) dir->__handle);
dir->__handle = INVALID_HANDLE_VALUE;
}
dir->__d_position = 0;
io_status.hEvent);
if (!overlapped_armed)
{
- (void) SetCommMask (get_handle (), EV_RXCHAR);
+ SetCommMask (get_handle (), EV_RXCHAR);
ResetEvent (io_status.hEvent);
}
void
fhandler_serial::init (HANDLE f, DWORD flags, mode_t bin)
{
- (void) open (flags, bin & (O_BINARY | O_TEXT));
+ open (flags, bin & (O_BINARY | O_TEXT));
}
int
res = 1;
- (void) SetCommMask (get_handle (), EV_RXCHAR);
+ SetCommMask (get_handle (), EV_RXCHAR);
uninterruptible_io (true); // Handled explicitly in read code
overlapped_setup ();
memset (&to, 0, sizeof (to));
- (void) SetCommTimeouts (get_handle (), &to);
+ SetCommTimeouts (get_handle (), &to);
/* Reset serial port to known state of 9600-8-1-no flow control
on open for better behavior under Win 95.
int
fhandler_serial::close ()
{
- (void) ForceCloseHandle (io_status.hEvent);
+ ForceCloseHandle (io_status.hEvent);
return fhandler_base::close ();
}
if (p == myself)
killself++;
else
- (void) sig_send (p, si);
+ sig_send (p, si);
}
if (killself)
sig_send (myself, si);
else if (CCEQ (ti.c_cc[VEOF], c))
{
termios_printf ("EOF");
- (void) accept_input ();
+ accept_input ();
ret = line_edit_input_done;
continue;
}
DWORD bytes_left;
int ret = 1;
- (void) WaitForSingleObject (input_mutex, INFINITE);
+ WaitForSingleObject (input_mutex, INFINITE);
bytes_left = eat_readahead (-1);
sync_with_parent ("loaded dlls", true);
}
- (void) ForceCloseHandle1 (fork_info->forker_finished, forker_finished);
+ ForceCloseHandle1 (fork_info->forker_finished, forker_finished);
_my_tls.fixup_after_fork ();
sigproc_init ();
goto cleanup;
}
/* Start the child up again. */
- (void) resume_child (forker_finished);
+ resume_child (forker_finished);
}
ForceCloseHandle (pi.hThread);
void *origfn = (void *) pi->u1.Function;
pi->u1.Function = (DWORD) hookfn;
- (void) VirtualProtect (pi, sizeof (PVOID), flOldProtect, &flDontCare);
+ VirtualProtect (pi, sizeof (PVOID), flOldProtect, &flDontCare);
return origfn;
}
return -1;
if ((strlen(p) + strlen(name) + 1) >= sizeof fullname)
return -1;
- (void) strcpy(fullname, p);
- (void) strcat(fullname, "/");
- (void) strcat(fullname, name);
+ strcpy(fullname, p);
+ strcat(fullname, "/");
+ strcat(fullname, name);
/*
** Set doaccess if '.' (as in "../") shows up in name.
*/
if ((size_t) sp->charcnt > sizeof sp->chars)
return -1;
cp = sp->chars;
- (void) strncpy(cp, stdname, stdlen);
+ strncpy(cp, stdname, stdlen);
cp += stdlen;
*cp++ = '\0';
if (dstlen != 0) {
- (void) strncpy(cp, dstname, dstlen);
+ strncpy(cp, dstname, dstlen);
*(cp + dstlen) = '\0';
}
return 0;
gmtload(struct state *sp)
{
if (tzload(gmt, sp) != 0)
- (void) tzparse(gmt, sp, true);
+ tzparse(gmt, sp, true);
}
#ifndef STD_INSPIRED
return;
lcl_is_set = (strlen(name) < sizeof (lcl_TZname));
if (lcl_is_set)
- (void) strcpy(lcl_TZname, name);
+ strcpy(lcl_TZname, name);
#ifdef ALL_STATE
if (lclptr == NULL) {
lclptr->timecnt = 0;
lclptr->ttis[0].tt_gmtoff = 0;
lclptr->ttis[0].tt_abbrind = 0;
- (void) strcpy(lclptr->chars, gmt);
+ strcpy(lclptr->chars, gmt);
} else if (tzload(name, lclptr) != 0) {
if (name[0] == ':' || tzparse(name, lclptr, false) != 0)
- (void) gmtload(lclptr);
+ gmtload(lclptr);
}
settzname();
}
else if (!forwrite)
*p = dummytest (p);
else
- (void) dummytest (p);
+ dummytest (p);
iov++;
iovcnt--;
if (base != address)
{
MEMORY_BASIC_INFORMATION m;
- (void) VirtualQuery (address, &m, sizeof (m));
+ VirtualQuery (address, &m, sizeof (m));
system_printf ("requested %p != %p mem alloc base %p, state %p, size %d, %E",
address, base, m.AllocationBase, m.State, m.RegionSize);
}
{
static char linebuf[1024]; // must be static and
// should not be NO_COPY
- (void) cygheap->user.ontherange (CH_HOME, NULL);
+ cygheap->user.ontherange (CH_HOME, NULL);
snprintf (linebuf, sizeof (linebuf), "%s:*:%lu:%lu:,%s:%s:/bin/sh",
cygheap->user.name (),
myself->uid == ILLEGAL_UID ? UNKNOWN_UID : myself->uid,
|| strncasematch (s, "con", 3))
p = s + n;
else if (strncasematch (s, "com", 3) || strncasematch (s, "lpt", 3))
- (void) strtoul (s + 3, (char **) &p, 10);
+ strtoul (s + 3, (char **) &p, 10);
if (p && (*p == '\0' || *p == '.'))
return -1;
{
strcpy (w32oldpath, oldpath);
create_how = CREATE_ALWAYS;
- (void) SetFileAttributes (win32_path, FILE_ATTRIBUTE_NORMAL);
+ SetFileAttributes (win32_path, FILE_ATTRIBUTE_NORMAL);
}
else
{
fn[n] = etc_fn;
change_possible[n] = false;
- (void) test_file_change (n);
+ test_file_change (n);
paranoid_printf ("fn[%d] %s, curr_ix %d", n, fn[n], curr_ix);
return n;
}
change_possible[n] = true;
else if (WaitForSingleObject (changed_h, 0) == WAIT_OBJECT_0)
{
- (void) FindNextChangeNotification (changed_h);
+ FindNextChangeNotification (changed_h);
memset (change_possible, true, sizeof change_possible);
}
}
myself->process_state |= PID_IN_USE;
myself->dwProcessId = GetCurrentProcessId ();
- (void) GetModuleFileName (NULL, myself->progname, sizeof (myself->progname));
+ GetModuleFileName (NULL, myself->progname, sizeof (myself->progname));
if (!strace.active)
strace.hello ();
debug_printf ("myself->dwProcessId %u", myself->dwProcessId);
/* Move to an innocuous location to avoid a race with other processes
that may want to manipulate the current directory before this
process has completely exited. */
- (void) SetCurrentDirectory (windows_system_directory);
+ SetCurrentDirectory (windows_system_directory);
}
void
sigproc_printf ("WriteFile read handle failed, %E");
}
- (void) ReadFile (__fromthem, &nr, sizeof (nr), &nr, NULL);
+ ReadFile (__fromthem, &nr, sizeof (nr), &nr, NULL);
break;
}
}
}
DWORD x = ReadFile (fromthem, res.handles, sizeof (res.handles), &nr, NULL);
- (void) WriteFile (tothem, &x, sizeof (x), &x, NULL);
+ WriteFile (tothem, &x, sizeof (x), &x, NULL);
if (!x)
goto err;
if (th->detach (read_state) && !in_len)
in_len = (size_t) -1; /* received a signal */
}
- (void) ReleaseMutex (guard);
+ ReleaseMutex (guard);
return;
}
goto out;
}
- (void) SetCommMask (h, EV_RXCHAR);
+ SetCommMask (h, EV_RXCHAR);
if (!fh->overlapped_armed)
{
me.fd = fd;
while (!avail)
{
- (void) select_read (&me);
+ select_read (&me);
avail = me.read_ready ?: me.peek (&me, false);
if (fd >= 0 && cygheap->fdtab.not_open (fd))
else
{
addr = offsets[m];
- (void) VirtualFree (addr, 0, MEM_RELEASE);
+ VirtualFree (addr, 0, MEM_RELEASE);
}
if (shared_h)
rem = 0;
if (rc == WAIT_OBJECT_0)
{
- (void) _my_tls.call_signal_handler ();
+ _my_tls.call_signal_handler ();
set_errno (EINTR);
res = -1;
}
newmask = *set;
break;
}
- (void) set_signal_mask (newmask, opmask);
+ set_signal_mask (newmask, opmask);
}
return 0;
}
si2.si_signo = SIGCONT;
si2.si_code = SI_KERNEL;
si2.si_pid = si2.si_uid = si2.si_errno = 0;
- (void) sig_send (this, si2);
+ sig_send (this, si2);
}
syscall_printf ("%d = _pinfo::kill (%d, %d), process_state %p", res, pid,
set_signal_mask (sig_mask);
raise (SIGABRT);
- (void) _my_tls.call_signal_handler (); /* Call any signal handler */
+ _my_tls.call_signal_handler (); /* Call any signal handler */
do_exit (SIGABRT); /* signal handler didn't exit. Goodbye. */
}
siginterrupt (int sig, int flag)
{
struct sigaction act;
- (void) sigaction(sig, NULL, &act);
+ sigaction(sig, NULL, &act);
if (flag)
act.sa_flags &= ~SA_RESTART;
else
{
sigproc_printf ("wait_sig_inited %p", wait_sig_inited);
HANDLE hsig_inited = wait_sig_inited;
- (void) WaitForSingleObject (hsig_inited, INFINITE);
+ WaitForSingleObject (hsig_inited, INFINITE);
wait_sig_inited = NULL;
- (void) ForceCloseHandle1 (hsig_inited, wait_sig_inited);
+ ForceCloseHandle1 (hsig_inited, wait_sig_inited);
}
/* Get the sync_proc_subproc muto to control access to
{
sync_proc_subproc.acquire (WPSP);
- (void) proc_subproc (PROC_CLEARWAIT, 1);
+ proc_subproc (PROC_CLEARWAIT, 1);
/* Clean out proc processes from the pid list. */
int i;
#ifdef DEBUGGING
sigproc_printf ("flushing");
#endif
- (void) sig_send (myself, fast ? __SIGFLUSHFAST : __SIGFLUSH);
+ sig_send (myself, fast ? __SIGFLUSHFAST : __SIGFLUSH);
}
void __stdcall
Static bool holding_signals;
/* Initialization */
- (void) SetThreadPriority (GetCurrentThread (), WAIT_SIG_PRIORITY);
+ SetThreadPriority (GetCurrentThread (), WAIT_SIG_PRIORITY);
if (!CreatePipe (&readsig, &myself->sendsig, sec_user_nih (sa_buf), 0))
api_fatal ("couldn't create signal pipe, %E");
cleanup.oldquit = signal (SIGQUIT, SIG_IGN);
sigemptyset (&child_block);
sigaddset (&child_block, SIGCHLD);
- (void) sigprocmask (SIG_BLOCK, &child_block, &cleanup.oldmask);
+ sigprocmask (SIG_BLOCK, &child_block, &cleanup.oldmask);
}
pthread_cleanup_push (do_cleanup, (void *) &cleanup);
just in case we've been previously
execed. */
myself.zap_cwd ();
- (void) myself->dup_proc_pipe (pi.hProcess);
+ myself->dup_proc_pipe (pi.hProcess);
}
}
else
the fields filled out by child.remember do not disappear and so there
is not a brief period during which the pid is not available.
However, we should try to find another way to do this eventually. */
- (void) DuplicateHandle (hMainProc, child.shared_handle (), pi.hProcess,
+ DuplicateHandle (hMainProc, child.shared_handle (), pi.hProcess,
NULL, 0, 0, DUPLICATE_SAME_ACCESS);
child->start_time = time (NULL); /* Register child's starting time. */
child->nice = myself->nice;
if (!--visits)
{
tls = 0; /* We were the last unlocker. */
- (void) InterlockedExchange (&sync, 0); /* Reset trigger. */
+ InterlockedExchange (&sync, 0); /* Reset trigger. */
/* This thread had incremented waiters but had never decremented it.
Decrement it now. If it is >= 0 then there are possibly other
threads waiting for the lock, so trigger bruteforce. */
if (InterlockedDecrement (&waiters) >= 0)
- (void) SetEvent (bruteforce); /* Wake up one of the waiting threads */
+ SetEvent (bruteforce); /* Wake up one of the waiting threads */
else if (*name == '!')
{
CloseHandle (bruteforce); /* If *name == '!' and there are no
if (h != INVALID_HANDLE_VALUE)
{
if (wincap.has_hard_links () && setattrs)
- (void) SetFileAttributes (win32_name, (DWORD) win32_name);
+ SetFileAttributes (win32_name, (DWORD) win32_name);
BOOL res = CloseHandle (h);
syscall_printf ("%d = CloseHandle (%p)", res, h);
if (GetFileAttributes (win32_name) == INVALID_FILE_ATTRIBUTES
DWORD lasterr;
lasterr = GetLastError ();
- (void) SetFileAttributes (win32_name, (DWORD) win32_name);
+ SetFileAttributes (win32_name, (DWORD) win32_name);
/* Windows 9x seems to report ERROR_ACCESS_DENIED rather than sharing
violation. So, set lasterr to ERROR_SHARING_VIOLATION in this case
else if (!cfd->is_tty ())
set_errno (ENOTTY);
else if ((res = cfd->tcgetattr (t)) == 0)
- (void) __toapp_termios (in_t, t);
+ __toapp_termios (in_t, t);
if (res)
termios_printf ("%d = tcgetattr (%d, %p)", res, fd, in_t);
{
struct termios *tp = __tonew_termios (in_tp);
int res = setspeed (tp->c_ospeed, speed);
- (void) __toapp_termios (in_tp, tp);
+ __toapp_termios (in_tp, tp);
return res;
}
{
struct termios *tp = __tonew_termios (in_tp);
int res = setspeed (tp->c_ispeed, speed);
- (void) __toapp_termios (in_tp, tp);
+ __toapp_termios (in_tp, tp);
return res;
}
set_owner (self);
else if (type == PTHREAD_MUTEX_NORMAL || !pthread::equal (owner, self))
{
- (void) cancelable_wait (win32_obj_id, INFINITE, cw_no_cancel, cw_sig_resume);
+ cancelable_wait (win32_obj_id, INFINITE, cw_no_cancel, cw_sig_resume);
set_owner (self);
}
else
syncthread = CreateEvent (&sec_none_nih, TRUE, FALSE, NULL);
else
ResetEvent (syncthread);
- (void) new cygthread (timer_thread, this, "itimer", syncthread);
+ new cygthread (timer_thread, this, "itimer", syncthread);
}
return 0;
DWORD len = sizeof our_utmp.ut_host;
bzero ((char *) &our_utmp, sizeof (utmp));
- (void) time (&our_utmp.ut_time);
+ time (&our_utmp.ut_time);
strncpy (our_utmp.ut_name, getlogin (), sizeof (our_utmp.ut_name));
GetComputerName (our_utmp.ut_host, &len);
__small_sprintf (our_utmp.ut_line, "tty%d", ttynum);
debug_printf ("gsid not found in augmented /etc/group");
}
}
- (void) cygheap->user.ontherange (CH_HOME, pw);
+ cygheap->user.ontherange (CH_HOME, pw);
return;
}
cygheap_user::env_name (const char *name, size_t namelen)
{
if (!test_uid (pwinname, name, namelen))
- (void) domain ();
+ domain ();
return pwinname;
}