summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2010-07-01 11:35:07 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2010-11-15 13:30:39 +1000
commitf75571f9cc9c32af5415ca7273e554505de5acbf (patch)
treefe9510be2e246cb81c0fbbfaed30020ca324f109 /src
parentcc1254e564ae1ffade8cb5a502b713175f6f24f4 (diff)
more void cast removal
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'src')
-rw-r--r--src/helpers/sigtool22
-rw-r--r--src/tet3/apilib/dconfig.c6
-rw-r--r--src/tet3/apilib/dresfile.c42
-rw-r--r--src/tet3/apilib/exit.c6
-rw-r--r--src/tet3/apilib/getsysid.c2
-rw-r--r--src/tet3/apilib/remexec.c24
-rw-r--r--src/tet3/apilib/remtime.c2
-rw-r--r--src/tet3/apilib/sync.c14
-rw-r--r--src/tet3/apilib/tet_exec.c4
-rw-r--r--src/tet3/apilib/tet_fork.c54
-rw-r--r--src/tet3/apilib/tet_spawn.c38
-rw-r--r--src/tet3/apithr/api_lock.c6
-rw-r--r--src/tet3/apithr/thr_create.c22
-rw-r--r--src/tet3/apithr/thr_create.c.orig22
-rw-r--r--src/tet3/demo/master/ts/tc3.c8
-rw-r--r--src/tet3/demo/slave/ts/tc3.c10
-rw-r--r--src/tet3/dtet2lib/alarm.c32
-rw-r--r--src/tet3/dtet2lib/avmsg.c2
-rw-r--r--src/tet3/dtet2lib/errname.c2
-rw-r--r--src/tet3/dtet2lib/fcopy.c24
-rw-r--r--src/tet3/dtet2lib/fork.c2
-rw-r--r--src/tet3/dtet2lib/globals.c4
-rw-r--r--src/tet3/dtet2lib/hexdump.c14
-rw-r--r--src/tet3/dtet2lib/madir.c2
-rw-r--r--src/tet3/dtet2lib/mkdir.c16
-rw-r--r--src/tet3/dtet2lib/notty.c10
-rw-r--r--src/tet3/dtet2lib/prerror.c10
-rw-r--r--src/tet3/dtet2lib/ptstate.c2
-rw-r--r--src/tet3/dtet2lib/ptype.c2
-rw-r--r--src/tet3/dtet2lib/repcode.c2
-rw-r--r--src/tet3/dtet2lib/reqcode.c2
-rw-r--r--src/tet3/dtet2lib/rescode.c4
-rw-r--r--src/tet3/dtet2lib/rtoa.c2
-rw-r--r--src/tet3/dtet2lib/sigsafe.c16
-rw-r--r--src/tet3/dtet2lib/strstore.c2
-rw-r--r--src/tet3/dtet2lib/svote.c2
-rw-r--r--src/tet3/dtet2lib/sysent.c6
-rw-r--r--src/tet3/dtet2lib/systate.c2
-rw-r--r--src/tet3/dtet2lib/targs.c2
-rw-r--r--src/tet3/dtet2lib/tdump.c2
-rw-r--r--src/tet3/dtet2lib/tfname.c4
-rw-r--r--src/tet3/dtet2lib/trace.c16
-rw-r--r--src/tet3/inc/dtthr.h4
-rw-r--r--src/tet3/inc/sigsafe.h4
-rw-r--r--src/tet3/inetlib/connect.c4
-rw-r--r--src/tet3/inetlib/discon.c2
-rw-r--r--src/tet3/inetlib/host.c2
-rw-r--r--src/tet3/inetlib/rdwr.c28
-rw-r--r--src/tet3/inetlib/rdwr.c.orig22
-rw-r--r--src/tet3/servlib/fio.c4
-rw-r--r--src/tet3/servlib/logon.c2
-rw-r--r--src/tet3/servlib/smain.c4
-rw-r--r--src/tet3/servlib/sproc.c6
-rw-r--r--src/tet3/servlib/tctalk.c2
-rw-r--r--src/tet3/servlib/tcxconf.c2
-rw-r--r--src/tet3/servlib/titcmenv.c8
-rw-r--r--src/tet3/servlib/xdxfile.c4
-rw-r--r--src/tet3/tcc/config.c58
-rw-r--r--src/tet3/tcc/copysave.c16
-rw-r--r--src/tet3/tcc/dtcc.c4
-rw-r--r--src/tet3/tcc/environ.c4
-rw-r--r--src/tet3/tcc/error.c8
-rw-r--r--src/tet3/tcc/exec.c2
-rw-r--r--src/tet3/tcc/jnlproc.c18
-rw-r--r--src/tet3/tcc/journal.c102
-rw-r--r--src/tet3/tcc/lock.c8
-rw-r--r--src/tet3/tcc/proctab.c6
-rw-r--r--src/tet3/tcc/proctc.c24
-rw-r--r--src/tet3/tcc/proctcd.c4
-rw-r--r--src/tet3/tcc/rescode.c10
-rw-r--r--src/tet3/tcc/resdir.c4
-rw-r--r--src/tet3/tcc/rrproc.c72
-rw-r--r--src/tet3/tcc/scen1.c16
-rw-r--r--src/tet3/tcc/scen2.c10
-rw-r--r--src/tet3/tcc/scenario.c2
-rw-r--r--src/tet3/tcc/scenpp.c48
-rw-r--r--src/tet3/tcc/scentab.c4
-rw-r--r--src/tet3/tcc/sigtrap.c42
-rw-r--r--src/tet3/tcc/tcc.c28
-rw-r--r--src/tet3/tcc/tcc_in.c10
-rw-r--r--src/tet3/tcc/tcc_xt.c32
-rw-r--r--src/tet3/tcc/tool.c12
-rw-r--r--src/tet3/tcc/utils.c16
-rw-r--r--src/tet3/tccd/config.c10
-rw-r--r--src/tet3/tccd/etab.c2
-rw-r--r--src/tet3/tccd/exec.c22
-rw-r--r--src/tet3/tccd/log.c14
-rw-r--r--src/tet3/tccd/log.c.orig14
-rw-r--r--src/tet3/tccd/stcc.c2
-rw-r--r--src/tet3/tccd/tccd.c26
-rw-r--r--src/tet3/tccd/tccd_in.c22
-rw-r--r--src/tet3/tccd/tccd_xt.c20
-rw-r--r--src/tet3/tccd/tccdstart.c2
-rw-r--r--src/tet3/tccd/tsfile.c14
-rw-r--r--src/tet3/tcclib/lockfile.c4
-rw-r--r--src/tet3/tcclib/lsdir.c2
-rw-r--r--src/tet3/tcclib/lsdir.c.orig2
-rw-r--r--src/tet3/tcclib/mktmpdir.c4
-rw-r--r--src/tet3/tcclib/procdir.c16
-rw-r--r--src/tet3/tcclib/rmrf.c4
-rw-r--r--src/tet3/tcclib/sharlock.c8
-rw-r--r--src/tet3/tcclib/tcfexec.c20
-rw-r--r--src/tet3/tcm/child.c2
-rw-r--r--src/tet3/tcm/ckversion.c10
-rw-r--r--src/tet3/tcm/dtcm.c46
-rw-r--r--src/tet3/tcm/ictp.c50
-rw-r--r--src/tet3/tcm/tcm_xt.c4
-rw-r--r--src/tet3/tcm/tcmfuncs.c6
-rw-r--r--src/tet3/xresd/tfproc.c4
-rw-r--r--src/tet3/xresd/xresd.c2
-rw-r--r--src/tet3/xresd/xresproc.c12
-rw-r--r--src/tet3/xresd/xtab.c10
-rw-r--r--src/tet3/xtilib/accept.c8
-rw-r--r--src/tet3/xtilib/addr2lname.c2
-rw-r--r--src/tet3/xtilib/connect.c8
-rw-r--r--src/tet3/xtilib/discon.c2
-rw-r--r--src/tet3/xtilib/poll.c10
-rw-r--r--src/tet3/xtilib/rdwr.c6
-rw-r--r--src/tet3/xtilib/tccdaddr.c2
-rw-r--r--src/tet3/xtilib/xtierror.c18
120 files changed, 767 insertions, 767 deletions
diff --git a/src/helpers/sigtool b/src/helpers/sigtool
index 6d2dadd4..85f3ace4 100644
--- a/src/helpers/sigtool
+++ b/src/helpers/sigtool
@@ -81,9 +81,9 @@ for sig in $std_sigs1 $std_sigs2
do
cat <<!EOF
#ifdef $sig
- (void) printf(" %d", $sig);
+ printf(" %d", $sig);
#else
- (void) printf(" $sig");
+ printf(" $sig");
#endif
!EOF
done > $tmp1_c
@@ -92,9 +92,9 @@ for sig in $spec_sigs
do
cat <<!EOF
#ifdef $sig
- (void) printf(" %d", $sig);
+ printf(" %d", $sig);
#else
- (void) printf(" $sig");
+ printf(" $sig");
#endif
!EOF
done > $tmp2_c
@@ -104,21 +104,21 @@ cat > $tmp3_c <<!EOF
#include <signal.h>
int main()
{
- (void) printf("SH_STD_SIGNALS =");
+ printf("SH_STD_SIGNALS =");
#include "$tmp1_c"
- (void) printf("\nSH_SPEC_SIGNALS =");
+ printf("\nSH_SPEC_SIGNALS =");
#include "$tmp2_c"
- (void) printf("\nSH_NSIG = ");
+ printf("\nSH_NSIG = ");
#ifdef NSIG
- (void) printf("%d", NSIG);
+ printf("%d", NSIG);
#else
# ifdef _NSIG
- (void) printf("%d", _NSIG);
+ printf("%d", _NSIG);
# else
- (void) printf("NSIG");
+ printf("NSIG");
# endif
#endif
- (void) printf("\n");
+ printf("\n");
return(0);
}
!EOF
diff --git a/src/tet3/apilib/dconfig.c b/src/tet3/apilib/dconfig.c
index 832ee2bb..6306dc21 100644
--- a/src/tet3/apilib/dconfig.c
+++ b/src/tet3/apilib/dconfig.c
@@ -150,7 +150,7 @@ TET_IMPORT void tet_config()
/* open the file */
if ((fp = fopen(file, "r")) == (FILE *) 0) {
err = errno;
- (void) sprintf(msg, "could not open config file \"%.*s\"",
+ sprintf(msg, "could not open config file \"%.*s\"",
MAXPATH, file);
tet_error(err, msg);
return;
@@ -181,7 +181,7 @@ TET_IMPORT void tet_config()
if (p < buf)
continue;
if (!tet_equindex(buf)) {
- (void) sprintf(msg, fmt, lcount, MAXPATH, file);
+ sprintf(msg, fmt, lcount, MAXPATH, file);
tet_error(0, msg);
continue;
}
@@ -195,6 +195,6 @@ TET_IMPORT void tet_config()
}
/* finally, close the file and return */
- (void) fclose(fp);
+ fclose(fp);
}
diff --git a/src/tet3/apilib/dresfile.c b/src/tet3/apilib/dresfile.c
index 8cf9451c..70aacfcc 100644
--- a/src/tet3/apilib/dresfile.c
+++ b/src/tet3/apilib/dresfile.c
@@ -364,7 +364,7 @@ char *data;
if (tet_minfoline(&data, 1) != 0)
{
- (void) sprintf(errbuf, fmt, data);
+ sprintf(errbuf, fmt, data);
tet_error(-tet_errno, errbuf);
tet_exit(EXIT_FAILURE);
}
@@ -414,7 +414,7 @@ int nlines;
continue;
/* generate the info line preamble and format the line */
- (void) sprintf(header, "%d|%ld %d %03d%05ld %ld %ld|",
+ sprintf(header, "%d|%ld %d %03d%05ld %ld %ld|",
TET_JNL_TC_INFO, tet_activity, tet_thistest,
tet_mysysid, tet_context, tet_block, tet_sequence++);
tet_msgform(header, lines[lnum], linebuf);
@@ -441,7 +441,7 @@ int nlines;
API_UNLOCK;
return(-1);
}
- (void) strcpy(&outbuf[bufpos], linebuf);
+ strcpy(&outbuf[bufpos], linebuf);
/* remember offset from start of outbuf */
/* (can't save pointer, as outbuf may move when grown) */
@@ -537,7 +537,7 @@ va_list ap;
else
{
inbuflen = vfprintf(fp, format, ap) + 1;
- (void) fclose(fp);
+ fclose(fp);
if (inbuflen <= (int) sizeof(defaultbuf))
{
@@ -591,7 +591,7 @@ va_list ap;
len = endp - inptr;
/* generate the info line preamble */
- (void) sprintf(linebuf, "%d|%ld %d %03d%05ld %ld %ld|",
+ sprintf(linebuf, "%d|%ld %d %03d%05ld %ld %ld|",
TET_JNL_TC_INFO, tet_activity, tet_thistest,
tet_mysysid, tet_context, tet_block, tet_sequence++);
@@ -616,7 +616,7 @@ va_list ap;
/* assemble the complete line and add it to output buffer */
- (void) strncat(linebuf, inptr, (size_t)len);
+ strncat(linebuf, inptr, (size_t)len);
if (*(inptr += len) == '\n')
inptr++; /* now points to start of next line */
len = strlen(linebuf) + 1; /* length including the null */
@@ -645,7 +645,7 @@ va_list ap;
API_UNLOCK;
return(-1);
}
- (void) strcpy(&outbuf[outpos], linebuf);
+ strcpy(&outbuf[outpos], linebuf);
/* remember offset from start of outbuf */
/* (can't save pointer, as outbuf may move when grown) */
@@ -746,7 +746,7 @@ int result;
if (tet_thistest == 0)
{
- (void) sprintf(errmsg,
+ sprintf(errmsg,
"tet_result(%d) called from test case startup or cleanup function",
result);
tet_error(0, errmsg);
@@ -770,7 +770,7 @@ int result;
tet_combined_ok = 0;
break;
}
- (void) sprintf(errmsg,
+ sprintf(errmsg,
"tet_result(): can't send result %d to XRESD",
result);
tet_error(tet_xderrno, errmsg);
@@ -790,7 +790,7 @@ int result;
resname = tet_get_code(result, (int *)NULL);
if (resname == NULL)
{
- (void) sprintf(errmsg,
+ sprintf(errmsg,
"INVALID result code %d passed to tet_result()",
result);
tet_error(0, errmsg);
@@ -932,20 +932,20 @@ char **msgs;
for (; nmsgs > 0; nmsgs--, msgs++) {
if (!*msgs && !errnum)
continue;
- (void) fprintf(stderr, "%s: %s",
+ fprintf(stderr, "%s: %s",
tet_pname, *msgs ? *msgs : "(NULL)");
if (errnum > 0) {
- (void) fprintf(stderr, ", errno = %d (%s)",
+ fprintf(stderr, ", errno = %d (%s)",
errnum, tet_errname(errnum));
}
else if (errnum < 0) {
- (void) fprintf(stderr, ", reply code = %s",
+ fprintf(stderr, ", reply code = %s",
tet_ptrepcode(errnum));
}
- (void) fprintf(stderr, "\n");
+ fprintf(stderr, "\n");
errnum = 0;
}
- (void) fflush(stderr);
+ fflush(stderr);
}
/*
@@ -1073,17 +1073,17 @@ char *msg, *outbuf;
** put errno first so as to avoid it being lost by truncation
*/
p = header;
- (void) sprintf(p, "%d|%ld|system %d", TET_JNL_TCM_INFO,
+ sprintf(p, "%d|%ld|system %d", TET_JNL_TCM_INFO,
tet_activity, tet_mysysid);
p += strlen(p);
if (errnum > 0)
- (void) sprintf(p, ", errno = %d (%s)",
+ sprintf(p, ", errno = %d (%s)",
errnum, tet_errname(errnum));
else if (errnum < 0)
- (void) sprintf(p, ", reply code = %s",
+ sprintf(p, ", reply code = %s",
tet_ptrepcode(errnum));
p += strlen(p);
- (void) sprintf(p, ": ");
+ sprintf(p, ": ");
/* Check the message format and write it into outbuf */
tet_msgform(header, msg ? msg : "(NULL)", outbuf);
@@ -1180,7 +1180,7 @@ char *header, *data, *outbuf;
/* see if the line was truncated */
if (*p1) {
- (void) sprintf(errmsg, fmt, (int) (sizeof errmsg - sizeof fmt),
+ sprintf(errmsg, fmt, (int) (sizeof errmsg - sizeof fmt),
header);
tet_error(0, errmsg);
}
@@ -1207,7 +1207,7 @@ int *abortflag;
/* file name is specified by TET_CODE communication variable */
fname = getenv("TET_CODE");
if (fname != NULL && *fname != '\0')
- (void) tet_readrescodes(fname);
+ tet_readrescodes(fname);
read_done++;
}
diff --git a/src/tet3/apilib/exit.c b/src/tet3/apilib/exit.c
index 963ca065..d5200a9d 100644
--- a/src/tet3/apilib/exit.c
+++ b/src/tet3/apilib/exit.c
@@ -120,14 +120,14 @@ TET_IMPORT void tet_logoff()
while (tet_ptab) {
pp = tet_ptab;
TET_SIGSAFE_START;
- (void) tet_ti_logoff(pp, 0);
+ tet_ti_logoff(pp, 0);
tet_ptrm(pp);
tet_ptfree(pp);
TET_SIGSAFE_END;
}
- (void) tet_sdlogoff(0);
- (void) tet_xdlogoff();
+ tet_sdlogoff(0);
+ tet_xdlogoff();
tet_ts_cleanup();
diff --git a/src/tet3/apilib/getsysid.c b/src/tet3/apilib/getsysid.c
index bc264ecd..06687174 100644
--- a/src/tet3/apilib/getsysid.c
+++ b/src/tet3/apilib/getsysid.c
@@ -94,7 +94,7 @@ struct tet_sysent *sysp;
#if TET_SNAMELEN != SNAMELEN
#error "TET_SNAMELEN != SNAMELEN"
#endif
- (void) strncpy(sysp->ts_name, entp->sy_name, sizeof(sysp->ts_name));
+ strncpy(sysp->ts_name, entp->sy_name, sizeof(sysp->ts_name));
sysp->ts_name[sizeof(sysp->ts_name) - 1] = '\0';
/* ignore the sy_tccd */
diff --git a/src/tet3/apilib/remexec.c b/src/tet3/apilib/remexec.c
index 444ec2ed..44fe17bf 100644
--- a/src/tet3/apilib/remexec.c
+++ b/src/tet3/apilib/remexec.c
@@ -176,10 +176,10 @@ register char **argv;
tet_errno = TET_ER_ERR;
return(-1);
}
- (void) sprintf(thistest, "%d", tet_thistest);
- (void) sprintf(activity, "%ld", tet_activity);
- (void) sprintf(context, "%ld", tet_context);
- (void) sprintf(block, "%ld", tet_block);
+ sprintf(thistest, "%d", tet_thistest);
+ sprintf(activity, "%ld", tet_activity);
+ sprintf(context, "%ld", tet_context);
+ sprintf(block, "%ld", tet_block);
*newargv = file;
*(newargv + TET_TCMC_THISTEST) = thistest;
*(newargv + TET_TCMC_ACTIVITY) = activity;
@@ -275,8 +275,8 @@ char *file, **argv;
/* do an auto-sync with the new process, kill the process and wait
for it a bit if this fails */
if (tet_sdasync(snid, tet_xrid, SV_EXEC_SPNO, SV_YES, SV_EXEC_TIMEOUT, (struct synreq *) 0, (int *) 0) < 0) {
- (void) tet_tckill(sysid, pid, SIGTERM);
- (void) tet_tcwait(sysid, pid, 10, (int *) 0);
+ tet_tckill(sysid, pid, SIGTERM);
+ tet_tcwait(sysid, pid, 10, (int *) 0);
errno = ENOEXEC;
tet_errno = -tet_sderrno;
return(-1L);
@@ -394,14 +394,14 @@ int *lconfp, *nconfp;
/* open the master config file */
if ((fid = tet_xdfopen(cfname)) < 0) {
- (void) sprintf(msg, fmt, MAXPATH, cfname);
+ sprintf(msg, fmt, MAXPATH, cfname);
error(0, msg, tet_ptrepcode(tet_xderrno));
return(-1);
}
/* get the config lines and close the file */
rc = getcf3(fid, confp, lconfp, nconfp);
- (void) tet_xdfclose(fid);
+ tet_xdfclose(fid);
return(rc);
}
@@ -569,14 +569,14 @@ int sysid;
for (ep = envs; ep < &envs[Nenvs]; ep++)
*ep = (char *) 0;
ep = &envs[0];
- (void) sprintf(buf, "%s=%.*s",
+ sprintf(buf, "%s=%.*s",
tetroot_name,
(int) sizeof buf - (int) sizeof tetroot_name - 1,
tetroot_value);
if ((*ep++ = tet_strstore(buf)) == (char *) 0)
rc = -1;
if (!rc && tetexec_value) {
- (void) sprintf(buf, "%s=%.*s",
+ sprintf(buf, "%s=%.*s",
tetexec_name,
(int) sizeof buf - (int) sizeof tetexec_name - 1,
tetexec_value);
@@ -598,7 +598,7 @@ int sysid;
return(rc);
/* construct target system exec config file name and send it to TCCD */
- (void) sprintf(buf, "%.*s/%s",
+ sprintf(buf, "%.*s/%s",
(int) sizeof buf - (int) sizeof ecfname - 1,
tsroot_value, ecfname);
TRACE3(tet_Ttcm, 6, "send exec config file name \"%s\" to system %s",
@@ -640,7 +640,7 @@ int sysid;
for (p1 = cconf, n = ncconf; n > 0; p1++, n--) {
if (tet_remvar(*p1, -1) != *p1)
continue;
- (void) sprintf(buf, "TET_REM%03d_%.*s", sysid % 1000,
+ sprintf(buf, "TET_REM%03d_%.*s", sysid % 1000,
(int) sizeof buf - 12, *p1);
if (BUFCHK((char **) &tconf, &ltconf, (int) ((ntconf + 1) * sizeof *tconf)) < 0)
return(-1);
diff --git a/src/tet3/apilib/remtime.c b/src/tet3/apilib/remtime.c
index 9794c553..e4d90f31 100644
--- a/src/tet3/apilib/remtime.c
+++ b/src/tet3/apilib/remtime.c
@@ -83,7 +83,7 @@ time_t *tp;
/* do something sensible if sysid is the local system */
if (sysid == tet_mysysid)
{
- (void) time(tp);
+ time(tp);
API_UNLOCK;
return 0;
}
diff --git a/src/tet3/apilib/sync.c b/src/tet3/apilib/sync.c
index e20ad757..53675e04 100644
--- a/src/tet3/apilib/sync.c
+++ b/src/tet3/apilib/sync.c
@@ -247,7 +247,7 @@ struct tet_synmsg *msgp;
char buf[100];
switch (tet_sderrno) {
case ER_DONE:
- (void) sprintf(buf,
+ sprintf(buf,
"sync event already happened, syncptno = %ld",
syncptno);
tet_error(0, buf);
@@ -362,19 +362,19 @@ int nsys;
** written out all at once;
** if this is not possible they are written out one-at-a-time
*/
- (void) sprintf(buf, "sync operation failed, syncptno = %ld, ",
+ sprintf(buf, "sync operation failed, syncptno = %ld, ",
syncptno);
p = buf + strlen(buf);
if (tet_errno == TET_ER_SYNCERR)
- (void) sprintf(p, "%sother system%s did not sync or timed out",
+ sprintf(p, "%sother system%s did not sync or timed out",
nsys > 1 ? "one or more of the " : nullstr,
nsys == 1 ? nullstr : sstr);
else if (tet_errno == TET_ER_TIMEDOUT)
- (void) sprintf(p, "request timed out");
+ sprintf(p, "request timed out");
else if (tet_errno >= 0 && tet_errno < tet_nerr)
- (void) sprintf(p, "%s", tet_errlist[tet_errno]);
+ sprintf(p, "%s", tet_errlist[tet_errno]);
else
- (void) sprintf(p, "tet_errno = %d (unknown value)", tet_errno);
+ sprintf(p, "tet_errno = %d (unknown value)", tet_errno);
if (lines)
*lp++ = tet_strstore(buf);
else
@@ -382,7 +382,7 @@ int nsys;
/* generate the per-system diagnostics */
for (tsp = statp; tsp < statp + nsys; tsp++) {
- (void) sprintf(buf, "system = %2d, state = %s",
+ sprintf(buf, "system = %2d, state = %s",
tsp->tsy_sysid, tet_systate(tsp->tsy_state));
if (lines)
*lp++ = tet_strstore(buf);
diff --git a/src/tet3/apilib/tet_exec.c b/src/tet3/apilib/tet_exec.c
index 7a11bc00..c4893276 100644
--- a/src/tet3/apilib/tet_exec.c
+++ b/src/tet3/apilib/tet_exec.c
@@ -389,8 +389,8 @@ char *file, *argv[], *envp[];
# ifndef TET_LITE /* -START-LITE-CUT- */
API_LOCK;
if (tet_xdlogon() == 0)
- (void) tet_xdxrsend(tet_xrid);
- (void) tet_sdlogon();
+ tet_xdxrsend(tet_xrid);
+ tet_sdlogon();
API_UNLOCK;
# endif /* -END-LITE-CUT- */
switch (errsave) {
diff --git a/src/tet3/apilib/tet_fork.c b/src/tet3/apilib/tet_fork.c
index ad0ac259..1106fa31 100644
--- a/src/tet3/apilib/tet_fork.c
+++ b/src/tet3/apilib/tet_fork.c
@@ -253,13 +253,13 @@ int sig;
struct sigaction sa;
if (tet_child > 0)
- (void) tet_killw(tet_child, KILLWAIT);
+ tet_killw(tet_child, KILLWAIT);
sa.sa_handler = SIG_DFL;
sa.sa_flags = 0;
- (void) sigemptyset(&sa.sa_mask);
- (void) sigaction(SIGTERM, &sa, (struct sigaction *)NULL);
- (void) kill(getpid(), SIGTERM);
+ sigemptyset(&sa.sa_mask);
+ sigaction(SIGTERM, &sa, (struct sigaction *)NULL);
+ kill(getpid(), SIGTERM);
}
# ifdef FORK1
@@ -288,8 +288,8 @@ int exitvals;
# endif
# endif /* TET_THREADS */
- (void) fflush(stdout);
- (void) fflush(stderr);
+ fflush(stdout);
+ fflush(stderr);
/* Save old value of tet_child in case of recursive calls
to tet_fork(). RESTORE tet_child BEFORE ALL RETURNS. */
@@ -342,10 +342,10 @@ int exitvals;
# else
TET_MUTEX_UNLOCK(&tet_top_mtx);
# endif
- (void) TET_THR_SIGSETMASK(SIG_SETMASK, &oldset, (sigset_t *)0);
+ TET_THR_SIGSETMASK(SIG_SETMASK, &oldset, (sigset_t *)0);
# endif /* TET_THREADS */
- (void) sprintf(buf,
+ sprintf(buf,
# ifdef FORK1
# ifdef TET_POSIX_THREADS
"fork() failed in tet_fork1() - errno %d (%s)",
@@ -386,7 +386,7 @@ int exitvals;
new_sa.sa_handler != SIG_IGN)
{
new_sa.sa_handler = SIG_DFL;
- (void) sigaction(i, &new_sa,
+ sigaction(i, &new_sa,
(struct sigaction *)NULL);
}
}
@@ -398,8 +398,8 @@ int exitvals;
/* logon again to XRESD and SYNCD */
if (tet_xdlogon() == 0)
- (void) tet_xdxrsend(tet_xrid);
- (void) tet_sdlogon();
+ tet_xdxrsend(tet_xrid);
+ tet_sdlogon();
# endif /* -END-LITE-CUT- */
# ifdef TET_THREADS
@@ -408,7 +408,7 @@ int exitvals;
# else
TET_MUTEX_UNLOCK(&tet_top_mtx);
# endif
- (void) TET_THR_SIGSETMASK(SIG_SETMASK, &oldset, (sigset_t *)0);
+ TET_THR_SIGSETMASK(SIG_SETMASK, &oldset, (sigset_t *)0);
# endif /* TET_THREADS */
/* change context to distinguish output from parent's */
@@ -438,7 +438,7 @@ int exitvals;
new_sa.sa_handler == SIG_DFL)
{
new_sa.sa_handler = sig_term;
- (void) sigaction(SIGTERM, &new_sa, (struct sigaction *)NULL);
+ sigaction(SIGTERM, &new_sa, (struct sigaction *)NULL);
}
# ifdef TET_THREADS
@@ -447,7 +447,7 @@ int exitvals;
# else
TET_MUTEX_UNLOCK(&tet_top_mtx);
# endif
- (void) TET_THR_SIGSETMASK(SIG_SETMASK, &oldset, (sigset_t *)0);
+ TET_THR_SIGSETMASK(SIG_SETMASK, &oldset, (sigset_t *)0);
# endif /* TET_THREADS */
if (parentproc != NULL)
@@ -465,7 +465,7 @@ int exitvals;
if (waittime < 0)
{
- (void) tet_killw(tet_child, KILLWAIT);
+ tet_killw(tet_child, KILLWAIT);
tet_child = savchild;
return 0;
}
@@ -477,7 +477,7 @@ int exitvals;
new_aa.waittime = waittime;
new_aa.sa.sa_handler = alrm;
new_aa.sa.sa_flags = 0;
- (void) sigemptyset(&new_aa.sa.sa_mask);
+ sigemptyset(&new_aa.sa.sa_mask);
alrm_flag = 0;
if (tet_set_alarm(&new_aa, &old_aa) == -1)
fatal(errno, "failed to set alarm", (char *)0);
@@ -487,7 +487,7 @@ int exitvals;
err = errno;
if (waittime > 0)
- (void) tet_clr_alarm(&old_aa);
+ tet_clr_alarm(&old_aa);
/* check child wait status shows valid exit code, if not
report wait status and give UNRESOLVED result */
@@ -495,13 +495,13 @@ int exitvals;
if (rtval == -1)
{
if (alrm_flag > 0)
- (void) sprintf(buf, "child process timed out");
+ sprintf(buf, "child process timed out");
else
- (void) sprintf(buf, "waitpid() failed - errno %d (%s)",
+ sprintf(buf, "waitpid() failed - errno %d (%s)",
err, tet_errname(err));
tet_infoline(buf);
tet_result(TET_UNRESOLVED);
- (void) tet_killw(tet_child, KILLWAIT);
+ tet_killw(tet_child, KILLWAIT);
switch (err)
{
@@ -534,7 +534,7 @@ int exitvals;
}
else
{
- (void) sprintf(buf,
+ sprintf(buf,
"child process gave unexpected exit code %d",
status);
tet_infoline(buf);
@@ -543,7 +543,7 @@ int exitvals;
else if (WIFSIGNALED(status))
{
status = WTERMSIG(status);
- (void) sprintf(buf,
+ sprintf(buf,
"child process was terminated by signal %d (%s)",
status, tet_signame(status));
tet_infoline(buf);
@@ -551,15 +551,15 @@ int exitvals;
else if (WIFSTOPPED(status))
{
status = WSTOPSIG(status);
- (void) sprintf(buf,
+ sprintf(buf,
"child process was stopped by signal %d (%s)",
status, tet_signame(status));
tet_infoline(buf);
- (void) tet_killw(tet_child, KILLWAIT);
+ tet_killw(tet_child, KILLWAIT);
}
else
{
- (void) sprintf(buf,
+ sprintf(buf,
"child process returned bad wait status (%#x)", status);
tet_infoline(buf);
}
@@ -589,7 +589,7 @@ unsigned int timeout;
new_aa.waittime = timeout;
new_aa.sa.sa_handler = alrm;
new_aa.sa.sa_flags = 0;
- (void) sigemptyset(&new_aa.sa.sa_mask);
+ sigemptyset(&new_aa.sa.sa_mask);
for (count = 0; count < 2; count++)
{
@@ -604,7 +604,7 @@ unsigned int timeout;
fatal(errno, "failed to set alarm", (char *)0);
pid = waitpid(child, &status, 0);
err = errno;
- (void) tet_clr_alarm(&old_aa);
+ tet_clr_alarm(&old_aa);
if (pid == child)
{
diff --git a/src/tet3/apilib/tet_spawn.c b/src/tet3/apilib/tet_spawn.c
index 1cea1018..9308b856 100644
--- a/src/tet3/apilib/tet_spawn.c
+++ b/src/tet3/apilib/tet_spawn.c
@@ -131,13 +131,13 @@ int sig;
struct sigaction sa;
if (childpid > 0)
- (void) tet_killw(childpid, KILLWAIT);
+ tet_killw(childpid, KILLWAIT);
sa.sa_handler = SIG_DFL;
sa.sa_flags = 0;
- (void) sigemptyset(&sa.sa_mask);
- (void) sigaction(SIGTERM, &sa, (struct sigaction *)NULL);
- (void) kill(getpid(), SIGTERM);
+ sigemptyset(&sa.sa_mask);
+ sigaction(SIGTERM, &sa, (struct sigaction *)NULL);
+ kill(getpid(), SIGTERM);
}
@@ -158,8 +158,8 @@ char *envp[];
return(-1);
}
- (void) fflush(stdout);
- (void) fflush(stderr);
+ fflush(stdout);
+ fflush(stderr);
# ifdef TET_THREADS
@@ -187,7 +187,7 @@ char *envp[];
# ifdef TET_THREADS
/* release all the mutexes and restore the signal mask */
tet_mtx_unlock();
- (void) TET_THR_SIGSETMASK(SIG_SETMASK, &oldset, (sigset_t *)0);
+ TET_THR_SIGSETMASK(SIG_SETMASK, &oldset, (sigset_t *)0);
# endif /* TET_THREADS */
@@ -226,9 +226,9 @@ char *envp[];
/* close the pipe and return */
if (pfd[0] >= 0)
- (void) close(pfd[0]);
+ close(pfd[0]);
if (pfd[1] >= 0)
- (void) close(pfd[1]);
+ close(pfd[1]);
return(pid);
}
@@ -279,7 +279,7 @@ int pfd[];
tet_mypid = getpid();
/* close the read side of the pipe */
- (void) close(pfd[0]);
+ close(pfd[0]);
pfd[0] = -1;
# ifdef TET_THREADS
@@ -300,7 +300,7 @@ int pfd[];
new_sa.sa_handler != SIG_IGN)
{
new_sa.sa_handler = SIG_DFL;
- (void) sigaction(i, &new_sa,
+ sigaction(i, &new_sa,
(struct sigaction *)NULL);
}
}
@@ -310,12 +310,12 @@ int pfd[];
tet_disconnect();
/* logon again to XRESD */
if (tet_xdlogon() == 0)
- (void) tet_xdxrsend(tet_xrid);
+ tet_xdxrsend(tet_xrid);
# endif /* -END-LITE-CUT- */
# ifdef TET_THREADS
tet_mtx_unlock();
- (void) TET_THR_SIGSETMASK(SIG_SETMASK, &oldset, (sigset_t *)0);
+ TET_THR_SIGSETMASK(SIG_SETMASK, &oldset, (sigset_t *)0);
# endif /* TET_THREADS */
/* change context to distinguish output from parent's */
@@ -330,19 +330,19 @@ int pfd[];
/* execute specified file */
errno = 0;
- (void) tet_exec(file, argv, envp);
+ tet_exec(file, argv, envp);
if (errno == ENOMEM)
{
/* This message is to distinguish malloc()
failure from exec() failure */
error(errno, "tet_exec() failed:", file);
- (void) fflush(stderr);
+ fflush(stderr);
}
/* send tet_errno to the parent process */
if ((rc = write(pfd[1], (void *) &tet_errno, sizeof tet_errno)) != sizeof tet_errno)
error(rc < 0 ? errno : 0,
"pipe write error in tet_spawn()", (char *) 0);
- (void) close(pfd[1]);
+ close(pfd[1]);
pfd[1] = -1;
tet_logoff();
_exit(127);
@@ -351,7 +351,7 @@ int pfd[];
/* parent process */
/* close the write side of the pipe */
- (void) close(pfd[1]);
+ close(pfd[1]);
pfd[1] = -1;
/*
@@ -378,7 +378,7 @@ int pfd[];
new_sa.sa_handler == SIG_DFL)
{
new_sa.sa_handler = sig_term;
- (void) sigaction(SIGTERM, &new_sa,
+ sigaction(SIGTERM, &new_sa,
(struct sigaction *)NULL);
}
}
@@ -462,7 +462,7 @@ int *statp;
new_sa.sa_handler == sig_term)
{
new_sa.sa_handler = SIG_DFL;
- (void) sigaction(SIGTERM, &new_sa,
+ sigaction(SIGTERM, &new_sa,
(struct sigaction *)NULL);
}
diff --git a/src/tet3/apithr/api_lock.c b/src/tet3/apithr/api_lock.c
index 7b2444fe..18bc9f7f 100644
--- a/src/tet3/apithr/api_lock.c
+++ b/src/tet3/apithr/api_lock.c
@@ -100,7 +100,7 @@ tet_api_lock(int getlock, const char *file, int line)
ownertid = TET_THR_SELF();
/* now it's safe to store the old signal set */
- (void) memcpy((void *)&oset, (void *)&tmpset, sizeof oset);
+ memcpy((void *)&oset, (void *)&tmpset, sizeof oset);
}
nestlevel++;
@@ -118,11 +118,11 @@ tet_api_lock(int getlock, const char *file, int line)
if (nestlevel == 0)
{
/* copy signal set to safe storage before unlocking */
- (void) memcpy((void *)&tmpset, (void *)&oset, sizeof oset);
+ memcpy((void *)&tmpset, (void *)&oset, sizeof oset);
TET_MUTEX_UNLOCK(&tet_top_mtx);
- (void) TET_THR_SIGSETMASK(SIG_SETMASK, &tmpset, (sigset_t *)0);
+ TET_THR_SIGSETMASK(SIG_SETMASK, &tmpset, (sigset_t *)0);
}
}
}
diff --git a/src/tet3/apithr/thr_create.c b/src/tet3/apithr/thr_create.c
index 651296a7..32acec0e 100644
--- a/src/tet3/apithr/thr_create.c
+++ b/src/tet3/apithr/thr_create.c
@@ -440,7 +440,7 @@ int sig;
/* wrong thread received SIGABRT signal - try to do what it
would have done */
- (void) sigaction(SIGABRT, &oldsigact, (struct sigaction *)NULL);
+ sigaction(SIGABRT, &oldsigact, (struct sigaction *)NULL);
if (oldsigact.sa_handler == SIG_DFL)
{
abort();
@@ -468,7 +468,7 @@ int sig;
}
if (tet_child > 0)
- (void) tet_killw(tet_child, KILLWAIT);
+ tet_killw(tet_child, KILLWAIT);
TET_THR_EXIT((void *)0);
}
@@ -489,7 +489,7 @@ int signum;
MTX_LOCK(&tet_thrtab_mtx);
- (void) TET_COND_INIT(&thrwait_cv);
+ TET_COND_INIT(&thrwait_cv);
/* Start at the end of the table and work backwards. This is
so that if a call to tet_pthread_join() is in progress, the
@@ -537,19 +537,19 @@ int signum;
*/
if (!TET_THR_EQUAL(ttp->tid, tid2))
- (void) TET_THR_JOIN(ttp->tid, (void **) NULL);
+ TET_THR_JOIN(ttp->tid, (void **) NULL);
TET_MUTEX_LOCK(&tet_thrwait_mtx);
joined = 1;
- (void) TET_COND_SIGNAL(&thrwait_cv);
+ TET_COND_SIGNAL(&thrwait_cv);
TET_MUTEX_UNLOCK(&tet_thrwait_mtx);
- (void) TET_THR_JOIN(tid2, (void **) NULL);
+ TET_THR_JOIN(tid2, (void **) NULL);
tet_listremove((struct llist **) &thrtab, (struct llist *) ttp);
TRACE2(tet_Tbuf, 6, "free thrtab entry = %s", tet_i2x(ttp));
free((void *)ttp);
}
thrtab = NULL;
- (void) TET_COND_DESTROY(&thrwait_cv);
+ TET_COND_DESTROY(&thrwait_cv);
MTX_UNLOCK(&tet_thrtab_mtx);
}
@@ -591,8 +591,8 @@ void *arg;
target_tid = carg->tid;
sa.sa_handler = make_thr_exit;
sa.sa_flags = 0;
- (void) sigemptyset(&sa.sa_mask);
- (void) sigaction(SIGABRT, &sa, &oldsigact);
+ sigemptyset(&sa.sa_mask);
+ sigaction(SIGABRT, &sa, &oldsigact);
err = TET_THR_KILL(carg->tid, SIGABRT);
switch (err)
{
@@ -600,7 +600,7 @@ void *arg;
break;
case ESRCH:
/* thread has gone away already */
- (void) sigaction(SIGABRT, &oldsigact, (struct sigaction *)0);
+ sigaction(SIGABRT, &oldsigact, (struct sigaction *)0);
return (void *)0;
default:
fatal(err, "TET_THR_KILL() failed in cln_thr2()", (char *)0);
@@ -620,7 +620,7 @@ void *arg;
err = 0;
TET_MUTEX_UNLOCK(&tet_thrwait_mtx);
if (err == 0)
- (void) sigaction(SIGABRT, &oldsigact, (struct sigaction *)0);
+ sigaction(SIGABRT, &oldsigact, (struct sigaction *)0);
else if (1
#ifdef ETIME
&& err != ETIME
diff --git a/src/tet3/apithr/thr_create.c.orig b/src/tet3/apithr/thr_create.c.orig
index 6262b146..c8ab2fc1 100644
--- a/src/tet3/apithr/thr_create.c.orig
+++ b/src/tet3/apithr/thr_create.c.orig
@@ -299,7 +299,7 @@ int sig;
/* wrong thread received SIGABRT signal - try to do what it
would have done */
- (void) sigaction(SIGABRT, &oldsigact, (struct sigaction *)NULL);
+ sigaction(SIGABRT, &oldsigact, (struct sigaction *)NULL);
if (oldsigact.sa_handler == SIG_DFL)
{
abort();
@@ -327,7 +327,7 @@ int sig;
}
if (tet_child > 0)
- (void) tet_killw(tet_child, KILLWAIT);
+ tet_killw(tet_child, KILLWAIT);
TET_THR_EXIT((void *)0);
}
@@ -348,7 +348,7 @@ int signum;
MTX_LOCK(&tet_thrtab_mtx);
- (void) TET_COND_INIT(&thrwait_cv);
+ TET_COND_INIT(&thrwait_cv);
for (ttp = thrtab; ttp; ttp = ttpnext)
{
@@ -385,19 +385,19 @@ int signum;
*/
if (!TET_THR_EQUAL(ttp->tid, tid2))
- (void) TET_THR_JOIN(ttp->tid, (void **) NULL);
+ TET_THR_JOIN(ttp->tid, (void **) NULL);
TET_MUTEX_LOCK(&tet_thrwait_mtx);
joined = 1;
- (void) TET_COND_SIGNAL(&thrwait_cv);
+ TET_COND_SIGNAL(&thrwait_cv);
TET_MUTEX_UNLOCK(&tet_thrwait_mtx);
- (void) TET_THR_JOIN(tid2, (void **) NULL);
+ TET_THR_JOIN(tid2, (void **) NULL);
tet_listremove((struct llist **) &thrtab, (struct llist *) ttp);
TRACE2(tet_Tbuf, 6, "free thrtab entry = %s", tet_i2x(ttp));
free((void *)ttp);
}
thrtab = NULL;
- (void) TET_COND_DESTROY(&thrwait_cv);
+ TET_COND_DESTROY(&thrwait_cv);
MTX_UNLOCK(&tet_thrtab_mtx);
}
@@ -439,8 +439,8 @@ void *arg;
target_tid = carg->tid;
sa.sa_handler = make_thr_exit;
sa.sa_flags = 0;
- (void) sigemptyset(&sa.sa_mask);
- (void) sigaction(SIGABRT, &sa, &oldsigact);
+ sigemptyset(&sa.sa_mask);
+ sigaction(SIGABRT, &sa, &oldsigact);
err = TET_THR_KILL(carg->tid, SIGABRT);
switch (err)
{
@@ -448,7 +448,7 @@ void *arg;
break;
case ESRCH:
/* thread has gone away already */
- (void) sigaction(SIGABRT, &oldsigact, (struct sigaction *)0);
+ sigaction(SIGABRT, &oldsigact, (struct sigaction *)0);
return (void *)0;
default:
fatal(err, "TET_THR_KILL() failed in cln_thr2()", (char *)0);
@@ -468,7 +468,7 @@ void *arg;
err = 0;
TET_MUTEX_UNLOCK(&tet_thrwait_mtx);
if (err == 0)
- (void) sigaction(SIGABRT, &oldsigact, (struct sigaction *)0);
+ sigaction(SIGABRT, &oldsigact, (struct sigaction *)0);
else if (err != ETIME)
fatal(err, "TET_COND_TIMEDWAIT() failed in cln_thr2()",
(char *) 0);
diff --git a/src/tet3/demo/master/ts/tc3.c b/src/tet3/demo/master/ts/tc3.c
index 3a93eea8..7d178b6d 100644
--- a/src/tet3/demo/master/ts/tc3.c
+++ b/src/tet3/demo/master/ts/tc3.c
@@ -55,12 +55,12 @@ char *rptstr; /* failure to report */
else if (err > 0 && err < tet_nerr)
errstr = tet_errlist[err];
else {
- (void) sprintf(errbuf, "unknown tet_errno value %d", tet_errno);
+ sprintf(errbuf, "unknown tet_errno value %d", tet_errno);
errstr = errbuf;
}
if (tet_printf("%s%s%s", rptstr, colonstr, errstr) < 0) {
- (void) fprintf(stderr, "tet_printf() failed: tet_errno %d\n",
+ fprintf(stderr, "tet_printf() failed: tet_errno %d\n",
tet_errno);
exit(EXIT_FAILURE);
}
@@ -70,7 +70,7 @@ static void tp1()
{
tet_infoline("This is tp1 in the third test case (tc3, master)");
- (void) tet_printf("sync with slave (sysid: %d)", *sys1);
+ tet_printf("sync with slave (sysid: %d)", *sys1);
if (tet_remsync(101L, sys1, 1, TIMEOUT, TET_SV_YES,
(struct tet_synmsg *)0) != 0) {
@@ -89,7 +89,7 @@ static void tp2()
tet_infoline("This is tp2 in the third test case (tc3, master)");
- (void) tet_printf("send message \"%s\" to slave (sysid: %d)",
+ tet_printf("send message \"%s\" to slave (sysid: %d)",
tdata, *sys1);
msg.tsm_flags = TET_SMSNDMSG;
diff --git a/src/tet3/demo/slave/ts/tc3.c b/src/tet3/demo/slave/ts/tc3.c
index a7966290..84b98237 100644
--- a/src/tet3/demo/slave/ts/tc3.c
+++ b/src/tet3/demo/slave/ts/tc3.c
@@ -55,12 +55,12 @@ char *rptstr; /* failure to report */
else if (err > 0 && err < tet_nerr)
errstr = tet_errlist[err];
else {
- (void) sprintf(errbuf, "unknown tet_errno value %d", tet_errno);
+ sprintf(errbuf, "unknown tet_errno value %d", tet_errno);
errstr = errbuf;
}
if (tet_printf("%s%s%s", rptstr, colonstr, errstr) < 0) {
- (void) fprintf(stderr, "tet_printf() failed: tet_errno %d\n",
+ fprintf(stderr, "tet_printf() failed: tet_errno %d\n",
tet_errno);
exit(EXIT_FAILURE);
}
@@ -70,7 +70,7 @@ static void tp1()
{
tet_infoline("This is tp1 in the third test case (tc3, slave)");
- (void) tet_printf("sync with master (sysid: %d)", *sys0);
+ tet_printf("sync with master (sysid: %d)", *sys0);
if (tet_remsync(101L, sys0, 1, TIMEOUT, TET_SV_YES,
(struct tet_synmsg *)0) != 0) {
@@ -89,7 +89,7 @@ static void tp2()
tet_infoline("This is tp2 in the third test case (tc3, slave)");
- (void) tet_printf("sync with master (sysid: %d) and receive data",
+ tet_printf("sync with master (sysid: %d) and receive data",
*sys0);
msg.tsm_flags = TET_SMRCVMSG;
@@ -106,7 +106,7 @@ static void tp2()
error(0, "tet_remsync() set tsm_dlen <= 0 on slave");
else
{
- (void) tet_printf("received message \"%.*s\" from master",
+ tet_printf("received message \"%.*s\" from master",
msg.tsm_dlen, rcvbuf);
rescode = TET_PASS;
}
diff --git a/src/tet3/dtet2lib/alarm.c b/src/tet3/dtet2lib/alarm.c
index 0e182e4c..406298c1 100644
--- a/src/tet3/dtet2lib/alarm.c
+++ b/src/tet3/dtet2lib/alarm.c
@@ -134,11 +134,11 @@ struct alrmaction *new_aa, *old_aa;
/* SIGALRM is blocked between tet_sigsafe_start/end calls,
so unblock it. (This means the handler mustn't longjmp.) */
- (void) sigemptyset(&alrmset);
- (void) sigaddset(&alrmset, SIGALRM);
- (void) sigprocmask(SIG_UNBLOCK, &alrmset, &old_aa->mask);
+ sigemptyset(&alrmset);
+ sigaddset(&alrmset, SIGALRM);
+ sigprocmask(SIG_UNBLOCK, &alrmset, &old_aa->mask);
- (void) alarm(new_aa->waittime);
+ alarm(new_aa->waittime);
#else /* TET_THREADS */
@@ -166,7 +166,7 @@ struct alrmaction *new_aa, *old_aa;
TRACE2(tet_Tbuf, 6, "allocate condition variable = %s",
tet_i2x(alrmarg->cvp));
- (void) TET_COND_INIT(alrmarg->cvp);
+ TET_COND_INIT(alrmarg->cvp);
/* call alrm_thr() in a new thread */
alrmarg->waittime = new_aa->waittime;
@@ -176,7 +176,7 @@ struct alrmaction *new_aa, *old_aa;
err = TET_THR_CREATE(alrm_thr, (void *) alrmarg, &old_aa->join_tid);
if (err != 0)
{
- (void) TET_COND_DESTROY(alrmarg->cvp);
+ TET_COND_DESTROY(alrmarg->cvp);
TRACE2(tet_Tbuf, 6, "free condition variable = %s",
tet_i2x(alrmarg->cvp));
free((void *)alrmarg->cvp);
@@ -193,9 +193,9 @@ struct alrmaction *new_aa, *old_aa;
* action and send a SIGALRM to this thread.
*/
- (void) sigemptyset(&alrmset);
- (void) sigaddset(&alrmset, SIGALRM);
- (void) TET_THR_SIGSETMASK(SIG_UNBLOCK, &alrmset, &old_aa->mask);
+ sigemptyset(&alrmset);
+ sigaddset(&alrmset, SIGALRM);
+ TET_THR_SIGSETMASK(SIG_UNBLOCK, &alrmset, &old_aa->mask);
old_aa->cvp = alrmarg->cvp;
/* note alrmarg is freed in alrm_thr() */
@@ -253,7 +253,7 @@ void *varg;
MTX_UNLOCK(&tet_alarm_mtx);
if (err == 0)
{
- (void) TET_COND_DESTROY(cvp);
+ TET_COND_DESTROY(cvp);
TRACE2(tet_Tbuf, 6, "free condition variable = %s",
tet_i2x(cvp));
free((void *)cvp);
@@ -293,11 +293,11 @@ void *varg;
"second TET_COND_TIMEDWAIT() timed out in alrm_thr()",
(char *)0);
- (void) sigaction(SIGALRM, &oldsigact, (struct sigaction *)0);
+ sigaction(SIGALRM, &oldsigact, (struct sigaction *)0);
MTX_UNLOCK(&tet_sigalrm_mtx);
- (void) TET_COND_DESTROY(cvp);
+ TET_COND_DESTROY(cvp);
TRACE2(tet_Tbuf, 6, "free condition variable = %s", tet_i2x(cvp));
free((void *)cvp);
@@ -312,8 +312,8 @@ struct alrmaction *old_aa;
{
#ifndef TET_THREADS
- (void) alarm(0);
- (void) sigprocmask(SIG_SETMASK, &old_aa->mask, (sigset_t *)0);
+ alarm(0);
+ sigprocmask(SIG_SETMASK, &old_aa->mask, (sigset_t *)0);
if (sigaction(SIGALRM, &old_aa->sa, (struct sigaction *)0) == -1)
return -1;
@@ -326,10 +326,10 @@ struct alrmaction *old_aa;
return -1;
}
- (void) TET_THR_SIGSETMASK(SIG_SETMASK, &old_aa->mask, (sigset_t *) 0);
+ TET_THR_SIGSETMASK(SIG_SETMASK, &old_aa->mask, (sigset_t *) 0);
MTX_LOCK(&tet_alarm_mtx);
old_aa->waittime = 0; /* used as condition var */
- (void) TET_COND_SIGNAL(old_aa->cvp);
+ TET_COND_SIGNAL(old_aa->cvp);
MTX_UNLOCK(&tet_alarm_mtx);
old_aa->cvp = NULL; /* so a second call will give EINVAL */
diff --git a/src/tet3/dtet2lib/avmsg.c b/src/tet3/dtet2lib/avmsg.c
index bc0c06e7..11ffab98 100644
--- a/src/tet3/dtet2lib/avmsg.c
+++ b/src/tet3/dtet2lib/avmsg.c
@@ -108,7 +108,7 @@ register char *to;
for (n = 0; n < (int) from->av_argc; n++)
if (from->av_argv[n]) {
offset = sp - to;
- (void) tet_st2bs((char *) &offset,
+ tet_st2bs((char *) &offset,
to + AV_AVMSGSZ(n), &offst[0], 1);
for (p = from->av_argv[n]; *p; p++)
*sp++ = *p;
diff --git a/src/tet3/dtet2lib/errname.c b/src/tet3/dtet2lib/errname.c
index 52150382..2955688a 100644
--- a/src/tet3/dtet2lib/errname.c
+++ b/src/tet3/dtet2lib/errname.c
@@ -63,6 +63,6 @@ register int errnum;
if (errnum == ep->em_errno)
return(ep->em_errname);
- (void) sprintf(text, fmt, errnum);
+ sprintf(text, fmt, errnum);
return(text);
}
diff --git a/src/tet3/dtet2lib/fcopy.c b/src/tet3/dtet2lib/fcopy.c
index d3bd5ba0..cc5a9da1 100644
--- a/src/tet3/dtet2lib/fcopy.c
+++ b/src/tet3/dtet2lib/fcopy.c
@@ -137,7 +137,7 @@ char *dest;
if (dest_exists) {
dest_is_directory = S_ISDIR(st_dest.st_mode);
if (S_ISDIR(st_src.st_mode) && !dest_is_directory) {
- (void) sprintf(msg, fmt1, MAXPATH, src);
+ sprintf(msg, fmt1, MAXPATH, src);
error(ENOTDIR, msg, dest);
errno = ENOTDIR;
return(-1);
@@ -165,7 +165,7 @@ char *dest;
}
else {
len = (int) sizeof destfile - (int) strlen(dest) - 2;
- (void) sprintf(destfile, "%.*s/%.*s",
+ sprintf(destfile, "%.*s/%.*s",
(int) (sizeof destfile - 2), dest,
TET_MAX(len, 0), tet_basename(src));
dest = destfile;
@@ -177,7 +177,7 @@ char *dest;
** ignore files other than regular files
*/
if (!S_ISREG(st_src.st_mode)) {
- (void) sprintf(msg, fmt2, MAXPATH, src, MAXPATH, dest);
+ sprintf(msg, fmt2, MAXPATH, src, MAXPATH, dest);
error(0, msg, "(source is not a plain file)");
return(0);
}
@@ -210,12 +210,12 @@ char *dest;
if (dest_exists && !dest_is_directory) {
if (SRC_IS_DEST) {
- (void) sprintf(msg, fmt2, MAXPATH, src, MAXPATH, dest);
+ sprintf(msg, fmt2, MAXPATH, src, MAXPATH, dest);
error(0, msg, "(source and destination are identical)");
return(-1);
}
if (!S_ISREG(st_dest.st_mode)) {
- (void) sprintf(msg, fmt2, MAXPATH, src, MAXPATH, dest);
+ sprintf(msg, fmt2, MAXPATH, src, MAXPATH, dest);
error(0, msg,
"(destination exists and is not a plain file)");
return(-1);
@@ -240,14 +240,14 @@ char *dest;
if ((ofp = fopen(dest, "wb")) == (FILE *) 0) {
save_errno = errno;
error(errno, "can't open", dest);
- (void) fclose(ifp);
+ fclose(ifp);
errno = save_errno;
return(-1);
}
rc = 0;
while ((nread = fread(buf, sizeof buf[0], sizeof buf, ifp)) > 0) {
- (void) fwrite(buf, sizeof buf[0], (size_t) nread, ofp);
+ fwrite(buf, sizeof buf[0], (size_t) nread, ofp);
if (ferror(ofp)) {
save_errno = errno;
error(errno, "write error on", dest);
@@ -264,7 +264,7 @@ char *dest;
rc = -1;
}
- (void) fclose(ifp);
+ fclose(ifp);
if (fclose(ofp) < 0) {
save_errno = errno;
error(errno, "close error on", dest);
@@ -315,7 +315,7 @@ char *to;
&&
(len1 == len2 || isdirsep(*(to + len1)))
) {
- (void) sprintf(msg, fmt, MAXPATH, from, MAXPATH, to);
+ sprintf(msg, fmt, MAXPATH, from, MAXPATH, to);
error(0, msg, "would never return!");
return(-1);
}
@@ -337,10 +337,10 @@ char *to;
while ((dp = READDIR(dirp)) != (struct dirent *) 0) {
if (!strcmp(dp->d_name, ".") || !strcmp(dp->d_name, ".."))
continue;
- (void) sprintf(fromname, "%.*s/%.*s",
+ sprintf(fromname, "%.*s/%.*s",
(int) (sizeof fromname - 2), from,
TET_MAX(len1, 0), dp->d_name);
- (void) sprintf(toname, "%.*s/%.*s",
+ sprintf(toname, "%.*s/%.*s",
(int) (sizeof toname - 2), to,
TET_MAX(len2, 0), dp->d_name);
if ((tet_fcopy(fromname, toname) != 0) && (errno != ENOENT))
@@ -348,7 +348,7 @@ char *to;
}
save_errno = errno;
- (void) CLOSEDIR(dirp);
+ CLOSEDIR(dirp);
errno = save_errno;
return (errcount > 0 ? -1 : 0);
}
diff --git a/src/tet3/dtet2lib/fork.c b/src/tet3/dtet2lib/fork.c
index dcb10ec8..ab32e0e6 100644
--- a/src/tet3/dtet2lib/fork.c
+++ b/src/tet3/dtet2lib/fork.c
@@ -63,7 +63,7 @@ int tet_dofork()
register int rc, try;
for (try = 0; (rc = fork()) < 0 && try < 5; try++)
- (void) sleep((unsigned) TET_MAX(1 << try, 2));
+ sleep((unsigned) TET_MAX(1 << try, 2));
if (rc == 0)
tet_mypid = (int) getpid();
diff --git a/src/tet3/dtet2lib/globals.c b/src/tet3/dtet2lib/globals.c
index a65f4cc6..e2842c9c 100644
--- a/src/tet3/dtet2lib/globals.c
+++ b/src/tet3/dtet2lib/globals.c
@@ -103,7 +103,7 @@ TET_IMPORT void tet_init_globals(const char *progname, int ptype, int sysid,
tet_mysysid = sysid;
if ((p = getenv("TET_ROOT")) != (char *) 0)
- (void) sprintf(tet_root, "%.*s", (int) sizeof tet_root - 1, p);
+ sprintf(tet_root, "%.*s", (int) sizeof tet_root - 1, p);
if (!tet_libfatal)
tet_libfatal = minfatal;
@@ -124,7 +124,7 @@ static TET_NORETURN void minfatal(int err, const char *file, int line, const cha
if (tet_liberror)
(*tet_liberror)(err, file, line, s1, s2);
else
- (void) fprintf(stderr, "%s (%s, %d): %s %s\n",
+ fprintf(stderr, "%s (%s, %d): %s %s\n",
tet_progname, file, line, s1, s2 ? s2 : "");
exit(1);
}
diff --git a/src/tet3/dtet2lib/hexdump.c b/src/tet3/dtet2lib/hexdump.c
index db76c3c4..42558789 100644
--- a/src/tet3/dtet2lib/hexdump.c
+++ b/src/tet3/dtet2lib/hexdump.c
@@ -58,21 +58,21 @@ FILE *fp;
start = dp;
do {
- (void) fprintf(fp, "%#lx:", (long) start);
+ fprintf(fp, "%#lx:", (long) start);
if (start >= end)
continue;
p2 = TET_MIN(start + 16, end);
for (p1 = start; p1 < p2; p1++)
- (void) fprintf(fp, " %02x", (unsigned char) *p1);
+ fprintf(fp, " %02x", (unsigned char) *p1);
while (p1++ <= start + 16)
- (void) fprintf(fp, " ");
+ fprintf(fp, " ");
for (p1 = start; p1 < p2; p1++)
- (void) fprintf(fp, "%c",
+ fprintf(fp, "%c",
*p1 > '\040' && *p1 < '\177' ? *p1 : '.');
- (void) fprintf(fp, "\n");
+ fprintf(fp, "\n");
} while ((start += 16) < end);
- (void) fprintf(fp, "\n");
- (void) fflush(fp);
+ fprintf(fp, "\n");
+ fflush(fp);
}
diff --git a/src/tet3/dtet2lib/madir.c b/src/tet3/dtet2lib/madir.c
index 1a5c71e0..ae1d584f 100644
--- a/src/tet3/dtet2lib/madir.c
+++ b/src/tet3/dtet2lib/madir.c
@@ -68,7 +68,7 @@ char *path;
if (STAT(path, &stbuf) < 0) {
if (errno == ENOENT) {
- (void) sprintf(buf, "%.*s", (int)sizeof buf - 1, path);
+ sprintf(buf, "%.*s", (int)sizeof buf - 1, path);
rc = mkad2(buf);
}
else {
diff --git a/src/tet3/dtet2lib/mkdir.c b/src/tet3/dtet2lib/mkdir.c
index 131b4b80..2337c4a1 100644
--- a/src/tet3/dtet2lib/mkdir.c
+++ b/src/tet3/dtet2lib/mkdir.c
@@ -101,7 +101,7 @@ int mode;
break;
if (p > path) {
n = p - path;
- (void) sprintf(dir, "%.*s",
+ sprintf(dir, "%.*s",
TET_MIN(n, (int) sizeof dir - 1), path);
if (stat(dir, &stbuf) < 0)
return(-1);
@@ -162,7 +162,7 @@ char *path;
break;
if (p > path) {
n = p - path;
- (void) sprintf(dir, "%.*s",
+ sprintf(dir, "%.*s",
TET_MIN(n, (int) sizeof dir - 1), path);
if (tet_eaccess(dir, 02) < 0)
return(-1);
@@ -223,15 +223,15 @@ int mode;
argv[0] = prog;
argv[1] = path;
argv[2] = (char *) 0;
- (void) umask(~(mode & ~umask(0)) & 077);
- (void) execvp(prog, argv);
- (void) sprintf(msg, "can't exec: %s", prog);
+ umask(~(mode & ~umask(0)) & 077);
+ execvp(prog, argv);
+ sprintf(msg, "can't exec: %s", prog);
error(errno, msg, path);
_exit(~0);
/* NOTREACHED */
case -1:
save_errno = errno;
- (void) sprintf(msg, "can't fork: %s", prog);
+ sprintf(msg, "can't fork: %s", prog);
error(errno, msg, path);
errno = save_errno;
return(-2);
@@ -242,14 +242,14 @@ int mode;
break;
if (rc < 0) {
save_errno = errno;
- (void) sprintf(msg, "wait failed: %s", prog);
+ sprintf(msg, "wait failed: %s", prog);
error(errno, prog, msg);
errno = save_errno;
return(-2);
}
if (status & 0xffff) {
if ((status & 0xff00) != 0xff00) {
- (void) sprintf(msg, "%s failed:", prog);
+ sprintf(msg, "%s failed:", prog);
error(0, msg, path);
}
return(-1);
diff --git a/src/tet3/dtet2lib/notty.c b/src/tet3/dtet2lib/notty.c
index 24ffff0f..840c8fb4 100644
--- a/src/tet3/dtet2lib/notty.c
+++ b/src/tet3/dtet2lib/notty.c
@@ -72,7 +72,7 @@ void tet_tiocnotty()
# ifdef HAS_SETSID
/* easy - use setsid() to start a new session */
- (void) setsid();
+ setsid();
# else /* HAS_SETSID */
@@ -83,10 +83,10 @@ void tet_tiocnotty()
# endif
# if defined(SVR2) || defined(SVR3) || defined(SVR4) || defined(__hpux) || defined(_AIX)
- (void) setpgrp();
+ setpgrp();
# else
int pid = getpid();
- (void) setpgrp(pid, pid);
+ setpgrp(pid, pid);
# endif
@@ -96,8 +96,8 @@ void tet_tiocnotty()
** control terminal
*/
if ((ttyfd = open("/dev/tty", O_RDONLY | O_NDELAY)) >= 0) {
- (void) ioctl(ttyfd, TIOCNOTTY, 0);
- (void) close(ttyfd);
+ ioctl(ttyfd, TIOCNOTTY, 0);
+ close(ttyfd);
}
# endif /* TIOCNOTTY */
diff --git a/src/tet3/dtet2lib/prerror.c b/src/tet3/dtet2lib/prerror.c
index b02f7074..91dd0c52 100644
--- a/src/tet3/dtet2lib/prerror.c
+++ b/src/tet3/dtet2lib/prerror.c
@@ -65,20 +65,20 @@ void tet_prerror(FILE *fp, int errnum, const char *hdr, const char *file,
{
const char *s3, *s4;
- (void) fprintf(fp, "%s (%s, %d): %s",
+ fprintf(fp, "%s (%s, %d): %s",
hdr, tet_basename(file), line, s1);
if (s2 && *s2)
- (void) fprintf(fp, " %s", s2);
+ fprintf(fp, " %s", s2);
if (errnum > 0) {
s3 = ":";
if ((s4 = strerror(errnum)) == (char *) 0) {
s3 = ", errno =";
s4 = tet_errname(errnum);
}
- (void) fprintf(fp, "%s %s", s3, s4);
+ fprintf(fp, "%s %s", s3, s4);
}
- (void) putc('\n', fp);
- (void) fflush(fp);
+ putc('\n', fp);
+ fflush(fp);
errno = 0;
}
diff --git a/src/tet3/dtet2lib/ptstate.c b/src/tet3/dtet2lib/ptstate.c
index a6c1e422..ccf3115c 100644
--- a/src/tet3/dtet2lib/ptstate.c
+++ b/src/tet3/dtet2lib/ptstate.c
@@ -77,7 +77,7 @@ int state;
case PS_CONNECT:
return("CONNECT");
default:
- (void) sprintf(msg, "%s%d", text, state);
+ sprintf(msg, "%s%d", text, state);
return(msg);
}
}
diff --git a/src/tet3/dtet2lib/ptype.c b/src/tet3/dtet2lib/ptype.c
index 4547945d..8c6b67f6 100644
--- a/src/tet3/dtet2lib/ptype.c
+++ b/src/tet3/dtet2lib/ptype.c
@@ -74,7 +74,7 @@ int ptype;
case PT_STAND:
return("STANDALONE");
default:
- (void) sprintf(msg, "%s%d", text, ptype);
+ sprintf(msg, "%s%d", text, ptype);
return(msg);
}
}
diff --git a/src/tet3/dtet2lib/repcode.c b/src/tet3/dtet2lib/repcode.c
index 5d4bc381..560516d0 100644
--- a/src/tet3/dtet2lib/repcode.c
+++ b/src/tet3/dtet2lib/repcode.c
@@ -179,7 +179,7 @@ int rc;
case ER_ENOTEMPTY:
return("ER_ENOTEMPTY");
default:
- (void) sprintf(msg, "%s%d", text, rc);
+ sprintf(msg, "%s%d", text, rc);
return(msg);
}
}
diff --git a/src/tet3/dtet2lib/reqcode.c b/src/tet3/dtet2lib/reqcode.c
index 7c407c64..430df745 100644
--- a/src/tet3/dtet2lib/reqcode.c
+++ b/src/tet3/dtet2lib/reqcode.c
@@ -185,7 +185,7 @@ int request;
return("PRINT");
#endif
default:
- (void) sprintf(msg, "%s%d", text, request);
+ sprintf(msg, "%s%d", text, request);
return(msg);
}
}
diff --git a/src/tet3/dtet2lib/rescode.c b/src/tet3/dtet2lib/rescode.c
index fe7905f1..a68c1544 100644
--- a/src/tet3/dtet2lib/rescode.c
+++ b/src/tet3/dtet2lib/rescode.c
@@ -257,7 +257,7 @@ char *fname;
break;
}
- (void) fclose(fp);
+ fclose(fp);
return(rc);
}
@@ -329,7 +329,7 @@ int line;
{
char buf[128];
- (void) sprintf(buf, "%s in line %d, file", msg, line);
+ sprintf(buf, "%s in line %d, file", msg, line);
error(0, buf, file);
}
diff --git a/src/tet3/dtet2lib/rtoa.c b/src/tet3/dtet2lib/rtoa.c
index b674797f..f0ad1dff 100644
--- a/src/tet3/dtet2lib/rtoa.c
+++ b/src/tet3/dtet2lib/rtoa.c
@@ -71,7 +71,7 @@ struct remid *rp;
count = 0;
p = buf[count];
- (void) sprintf(p, fmt, rp->re_sysid, rp->re_pid,
+ sprintf(p, fmt, rp->re_sysid, rp->re_pid,
tet_ptptype(rp->re_ptype));
return(p);
}
diff --git a/src/tet3/dtet2lib/sigsafe.c b/src/tet3/dtet2lib/sigsafe.c
index 798ae5a3..adca65ce 100644
--- a/src/tet3/dtet2lib/sigsafe.c
+++ b/src/tet3/dtet2lib/sigsafe.c
@@ -72,23 +72,23 @@ TET_IMPORT void tet_init_blockable_sigs()
/* start with full set, and then remove signals that
should not be blocked */
- (void) sigfillset(&tet_blockable_sigs);
+ sigfillset(&tet_blockable_sigs);
/* the system won't allow these to be blocked */
- (void) sigdelset(&tet_blockable_sigs, SIGKILL);
- (void) sigdelset(&tet_blockable_sigs, SIGSTOP);
+ sigdelset(&tet_blockable_sigs, SIGKILL);
+ sigdelset(&tet_blockable_sigs, SIGSTOP);
/* blocking this could give problems, and it is unlikely
anyone would longjmp out of a SIGCHLD handler (no TET
code does), so it should be safe to leave it unblocked */
- (void) sigdelset(&tet_blockable_sigs, SIGCHLD);
+ sigdelset(&tet_blockable_sigs, SIGCHLD);
/* hardware signals that give undefined behaviour if blocked */
- (void) sigdelset(&tet_blockable_sigs, SIGSEGV);
- (void) sigdelset(&tet_blockable_sigs, SIGILL);
- (void) sigdelset(&tet_blockable_sigs, SIGFPE);
+ sigdelset(&tet_blockable_sigs, SIGSEGV);
+ sigdelset(&tet_blockable_sigs, SIGILL);
+ sigdelset(&tet_blockable_sigs, SIGFPE);
# ifdef SIGBUS
- (void) sigdelset(&tet_blockable_sigs, SIGBUS);
+ sigdelset(&tet_blockable_sigs, SIGBUS);
# endif
diff --git a/src/tet3/dtet2lib/strstore.c b/src/tet3/dtet2lib/strstore.c
index 6ef61d74..d0596796 100644
--- a/src/tet3/dtet2lib/strstore.c
+++ b/src/tet3/dtet2lib/strstore.c
@@ -72,7 +72,7 @@ char *s;
if ((p = malloc(len)) == (char *) 0)
error(errno, "can't get memory for string:", s);
else
- (void) strcpy(p, s);
+ strcpy(p, s);
TRACE4(tet_Tbuf, 6, "tet_strstore(\"%.24s%s\") returns %s",
s, len > 25 ? " ..." : "", tet_i2x(p));
diff --git a/src/tet3/dtet2lib/svote.c b/src/tet3/dtet2lib/svote.c
index 9df510a7..1517326e 100644
--- a/src/tet3/dtet2lib/svote.c
+++ b/src/tet3/dtet2lib/svote.c
@@ -63,7 +63,7 @@ int vote;
case SV_NO:
return("NO");
default:
- (void) sprintf(msg, "%s%d", text, vote);
+ sprintf(msg, "%s%d", text, vote);
return(msg);
}
}
diff --git a/src/tet3/dtet2lib/sysent.c b/src/tet3/dtet2lib/sysent.c
index 48c31c74..14d8c268 100644
--- a/src/tet3/dtet2lib/sysent.c
+++ b/src/tet3/dtet2lib/sysent.c
@@ -114,7 +114,7 @@ int tet_libsetsysent()
}
ASSERT(tet_root[0]);
- (void) sprintf(path, "%.*s/%s",
+ sprintf(path, "%.*s/%s",
(int) sizeof path - (int) sizeof file - 1, tet_root, file);
if ((sfp = fopen(path, "r")) == NULL) {
@@ -122,7 +122,7 @@ int tet_libsetsysent()
return(-1);
}
- (void) tet_fioclex(FILENO(sfp));
+ tet_fioclex(FILENO(sfp));
return(0);
}
@@ -133,7 +133,7 @@ int tet_libsetsysent()
void tet_libendsysent()
{
if (sfp != NULL) {
- (void) fclose(sfp);
+ fclose(sfp);
sfp = NULL;
}
}
diff --git a/src/tet3/dtet2lib/systate.c b/src/tet3/dtet2lib/systate.c
index 85c70370..7ab35e9d 100644
--- a/src/tet3/dtet2lib/systate.c
+++ b/src/tet3/dtet2lib/systate.c
@@ -72,7 +72,7 @@ int state;
case SS_DEAD:
return("DEAD");
default:
- (void) sprintf(msg, "%s%d", text, state);
+ sprintf(msg, "%s%d", text, state);
return(msg);
}
}
diff --git a/src/tet3/dtet2lib/targs.c b/src/tet3/dtet2lib/targs.c
index 0723cd48..6e162221 100644
--- a/src/tet3/dtet2lib/targs.c
+++ b/src/tet3/dtet2lib/targs.c
@@ -158,7 +158,7 @@ char **argv;
*p++ = sp->st_name;
*p++ = ',';
}
- (void) sprintf(p, "%c%d", tp->tf_name, tp->tf_value);
+ sprintf(p, "%c%d", tp->tf_name, tp->tf_value);
TRACE2(tet_Ttrace, 4, "trace arg = \"%s\"", *(ap - 1));
p += strlen(p) + 1;
}
diff --git a/src/tet3/dtet2lib/tdump.c b/src/tet3/dtet2lib/tdump.c
index 2af16ed0..f2bf7017 100644
--- a/src/tet3/dtet2lib/tdump.c
+++ b/src/tet3/dtet2lib/tdump.c
@@ -59,7 +59,7 @@ int len;
if (!tet_tfp)
tet_tfopen();
- (void) fprintf(tet_tfp, "%s:\n",
+ fprintf(tet_tfp, "%s:\n",
title && *title ? title : "data dump:");
tet_hexdump(from, len, tet_tfp);
diff --git a/src/tet3/dtet2lib/tfname.c b/src/tet3/dtet2lib/tfname.c
index 43bce3e7..0a617f55 100644
--- a/src/tet3/dtet2lib/tfname.c
+++ b/src/tet3/dtet2lib/tfname.c
@@ -158,7 +158,7 @@ char **np;
TRACE2(tet_Tbuf, 6, "allocate tfname = %s", tet_i2x(fname));
/* generate the file name */
- (void) sprintf(fname, "%s/%s%s%s", dir, prefix, &salt[1], pidstr);
+ sprintf(fname, "%s/%s%s%s", dir, prefix, &salt[1], pidstr);
/* try to open the file */
if ((fd = OPEN(fname, O_RDWR|O_CREAT|O_EXCL|O_BINARY, MODEANY)) < 0)
@@ -187,7 +187,7 @@ char **np;
break;
}
/* close the file and unlink it */
- (void) CLOSE(fd);
+ CLOSE(fd);
if (UNLINK(fname) < 0)
error(errno, "can't unlink", fname);
}
diff --git a/src/tet3/dtet2lib/trace.c b/src/tet3/dtet2lib/trace.c
index d315daa2..c05106a8 100644
--- a/src/tet3/dtet2lib/trace.c
+++ b/src/tet3/dtet2lib/trace.c
@@ -341,25 +341,25 @@ TET_IMPORT void tet_trace(const char *s1, const char *s2, const char *s3,
tet_tfopen();
#ifndef TET_THREADS
- (void) fprintf(tet_tfp, "%s (%ld)", tet_progname, (long) GETPID());
+ fprintf(tet_tfp, "%s (%ld)", tet_progname, (long) GETPID());
#else
- (void) fprintf(tet_tfp, "%s (%ld.%ld)", tet_progname, (long) GETPID(),
+ fprintf(tet_tfp, "%s (%ld.%ld)", tet_progname, (long) GETPID(),
(long) TET_THR_SELF());
#endif
if (tet_Ttrace > 0) {
now = time((time_t *) 0);
tp = localtime(&now);
if (tet_Ttrace > 1)
- (void) fprintf(tet_tfp, " %d:%02d:%02d",
+ fprintf(tet_tfp, " %d:%02d:%02d",
tp->tm_hour, tp->tm_min, tp->tm_sec);
else
- (void) fprintf(tet_tfp, " %d:%02d",
+ fprintf(tet_tfp, " %d:%02d",
tp->tm_min, tp->tm_sec);
}
- (void) fprintf(tet_tfp, ": ");
- (void) fprintf(tet_tfp, s1, s2, s3, s4, s5, s6);
- (void) putc('\n', tet_tfp);
- (void) fflush(tet_tfp);
+ fprintf(tet_tfp, ": ");
+ fprintf(tet_tfp, s1, s2, s3, s4, s5, s6);
+ putc('\n', tet_tfp);
+ fflush(tet_tfp);
errno = save_errno;
}
diff --git a/src/tet3/inc/dtthr.h b/src/tet3/inc/dtthr.h
index 4ca1fee0..d414a787 100644
--- a/src/tet3/inc/dtthr.h
+++ b/src/tet3/inc/dtthr.h
@@ -209,7 +209,7 @@ MODIFICATIONS:
# define TET_THR_EQUAL(a, b) ((a) == (b))
# define TET_THR_EXIT(sp) thr_exit((sp))
# define TET_THR_GETSPECIFIC(key, vp) \
- (*(vp) = (void *) 0, (void) thr_getspecific((key), (vp)))
+ (*(vp) = (void *) 0, thr_getspecific((key), (vp)))
# define TET_THR_JOIN(tid, sp) thr_join((tid), (thread_t *) 0, (sp))
# define TET_THR_KEYCREATE(kp) thr_keycreate((kp), TET_NULLFP)
# define TET_THR_KILL(tid, sig) thr_kill((tid), (sig))
@@ -237,7 +237,7 @@ MODIFICATIONS:
TET_THR_SIGSETMASK(SIG_BLOCK, &tet_blockable_sigs, &MTX_LOCK_oss); \
TET_MUTEX_LOCK(mp);
# define MTX_UNLOCK(mp) TET_MUTEX_UNLOCK(mp); if (MTX_LOCK_maskret == 0) \
- (void) TET_THR_SIGSETMASK(SIG_SETMASK, &MTX_LOCK_oss, (sigset_t *)0); }
+ TET_THR_SIGSETMASK(SIG_SETMASK, &MTX_LOCK_oss, (sigset_t *)0); }
/* top-level API mutex with calls that can be nested */
diff --git a/src/tet3/inc/sigsafe.h b/src/tet3/inc/sigsafe.h
index f8f9ee51..d4144dff 100644
--- a/src/tet3/inc/sigsafe.h
+++ b/src/tet3/inc/sigsafe.h
@@ -42,8 +42,8 @@ MODIFICATIONS:
** and how to call the functions themselves
*/
# define TET_SIGSAFE_DEF sigset_t oldset;
-# define TET_SIGSAFE_START (void) tet_sigsafe_start(&oldset)
-# define TET_SIGSAFE_END (void) tet_sigsafe_end(&oldset)
+# define TET_SIGSAFE_START tet_sigsafe_start(&oldset)
+# define TET_SIGSAFE_END tet_sigsafe_end(&oldset)
/* set of all blockable signals (to be blocked during critical code) */
TET_EXPORT_DATA(sigset_t, tet_blockable_sigs);
diff --git a/src/tet3/inetlib/connect.c b/src/tet3/inetlib/connect.c
index c129c278..e6c239b7 100644
--- a/src/tet3/inetlib/connect.c
+++ b/src/tet3/inetlib/connect.c
@@ -124,7 +124,7 @@ register struct ptab *pp;
pp->pt_flags |= PF_ATTENTION;
return;
}
- (void) close(sd);
+ close(sd);
sd = nsd;
}
@@ -164,7 +164,7 @@ register struct ptab *pp;
}
/* else fall through */
default:
- (void) sprintf(msg, fmt,
+ sprintf(msg, fmt,
inet_ntoa(tp->tp_sin.sin_addr),
(int) ntohs(tp->tp_sin.sin_port));
error(err, msg, tet_r2a(&pp->pt_rid));
diff --git a/src/tet3/inetlib/discon.c b/src/tet3/inetlib/discon.c
index f5274a43..04b4f389 100644
--- a/src/tet3/inetlib/discon.c
+++ b/src/tet3/inetlib/discon.c
@@ -71,7 +71,7 @@ struct ptab *pp;
tet_i2a(tp->tp_sd));
if (tp->tp_sd != INVALID_SOCKET) {
- (void) SOCKET_CLOSE(tp->tp_sd);
+ SOCKET_CLOSE(tp->tp_sd);
tp->tp_sd = INVALID_SOCKET;
}
diff --git a/src/tet3/inetlib/host.c b/src/tet3/inetlib/host.c
index 9654ee50..c8e14fd8 100644
--- a/src/tet3/inetlib/host.c
+++ b/src/tet3/inetlib/host.c
@@ -112,7 +112,7 @@ char *host;
cp2->hc_addr = *((struct in_addr *) hp->h_addr);
cp2->hc_refcnt = 1;
- (void) sprintf(cp2->hc_host, "%.*s",
+ sprintf(cp2->hc_host, "%.*s",
(int) sizeof cp2->hc_host - 1, host);
return(&cp2->hc_addr);
diff --git a/src/tet3/inetlib/rdwr.c b/src/tet3/inetlib/rdwr.c
index 23c350d8..52180c1e 100644
--- a/src/tet3/inetlib/rdwr.c
+++ b/src/tet3/inetlib/rdwr.c
@@ -119,7 +119,7 @@ register struct ptab *pp;
}
TDUMP(tet_Tio, 10, tp->tp_buf, DM_HDRSZ, msghdr);
pp->pt_flags &= ~PF_RCVHDR;
- (void) tet_bs2dtmhdr(tp->tp_buf, &pp->ptm_hdr, DM_HDRSZ);
+ tet_bs2dtmhdr(tp->tp_buf, &pp->ptm_hdr, DM_HDRSZ);
if (pp->ptm_magic != DTM_MAGIC && pp->ptm_len) {
/* we are probably out of sync with sender */
error(0, "received bad message header,",
@@ -249,7 +249,7 @@ register struct ptab *pp;
ignsa.sa_handler = SIG_IGN;
ignsa.sa_flags = 0;
- (void) sigemptyset(&ignsa.sa_mask);
+ sigemptyset(&ignsa.sa_mask);
/* set up variables for this message on first time through */
if ((pp->pt_flags & PF_INPROGRESS) == 0) {
@@ -278,7 +278,7 @@ register struct ptab *pp;
rc, msgdata);
tp->tp_cnt += rc;
}
- (void) tet_dmlen2bs(rc, tp->tp_buf);
+ tet_dmlen2bs(rc, tp->tp_buf);
} while (err);
tp->tp_ptr = tp->tp_buf;
pp->pt_flags |= PF_INPROGRESS;
@@ -292,13 +292,13 @@ register struct ptab *pp;
Signals just cause the write to be restarted (in an attempt
to cope with systems without restartable system calls) */
# ifndef TET_THREADS
- (void) sigaction(SIGPIPE, &ignsa, &oldsa);
+ sigaction(SIGPIPE, &ignsa, &oldsa);
# else
/* just block the signal for now so as to avoid interfering with
another thread's usage of SIGPIPE */
- (void) sigemptyset(&newset);
- (void) sigaddset(&newset, SIGPIPE);
- (void) TET_THR_SIGSETMASK(SIG_BLOCK, &newset, &oldset);
+ sigemptyset(&newset);
+ sigaddset(&newset, SIGPIPE);
+ TET_THR_SIGSETMASK(SIG_BLOCK, &newset, &oldset);
# endif /* TET_THREADS */
do {
@@ -308,7 +308,7 @@ register struct ptab *pp;
} while (rc < 0 && err == SOCKET_EINTR);
# ifndef TET_THREADS
- (void) sigaction(SIGPIPE, &oldsa, (struct sigaction *)NULL);
+ sigaction(SIGPIPE, &oldsa, (struct sigaction *)NULL);
# else
if (rc < 0 && (err == EPIPE || err == ECONNRESET))
{
@@ -317,15 +317,15 @@ register struct ptab *pp;
with another thread's usage of SIGPIPE, but the
chances are very small. Note that we unblock SIGPIPE
explicitly, since it may be a member of "oldset". */
- (void) sigaction(SIGPIPE, &ignsa, &oldsa);
- (void) TET_THR_SIGSETMASK(SIG_UNBLOCK, &newset, (sigset_t *) 0);
+ sigaction(SIGPIPE, &ignsa, &oldsa);
+ TET_THR_SIGSETMASK(SIG_UNBLOCK, &newset, (sigset_t *) 0);
/* now restore the original mask and handler */
- (void) TET_THR_SIGSETMASK(SIG_SETMASK, &oldset, (sigset_t *) 0);
- (void) sigaction(SIGPIPE, &oldsa, (struct sigaction *)NULL);
+ TET_THR_SIGSETMASK(SIG_SETMASK, &oldset, (sigset_t *) 0);
+ sigaction(SIGPIPE, &oldsa, (struct sigaction *)NULL);
}
else
- (void) TET_THR_SIGSETMASK(SIG_SETMASK, &oldset, (sigset_t *) 0);
+ TET_THR_SIGSETMASK(SIG_SETMASK, &oldset, (sigset_t *) 0);
# endif /* TET_THREADS */
/* set state and flags according to results */
@@ -452,7 +452,7 @@ register struct ptab *pp;
TRACE2(tet_Tio, 4, "tet_ts_dead: close sd %s", tet_i2a(tp->tp_sd));
- (void) SOCKET_CLOSE(tp->tp_sd);
+ SOCKET_CLOSE(tp->tp_sd);
tp->tp_sd = INVALID_SOCKET;
pp->pt_flags &= ~(PF_CONNECTED | PF_INPROGRESS);
}
diff --git a/src/tet3/inetlib/rdwr.c.orig b/src/tet3/inetlib/rdwr.c.orig
index ece32ab3..9b9a06fe 100644
--- a/src/tet3/inetlib/rdwr.c.orig
+++ b/src/tet3/inetlib/rdwr.c.orig
@@ -112,7 +112,7 @@ register struct ptab *pp;
}
TDUMP(tet_Tio, 10, tp->tp_buf, DM_HDRSZ, msghdr);
pp->pt_flags &= ~PF_RCVHDR;
- (void) tet_bs2dtmhdr(tp->tp_buf, &pp->ptm_hdr, DM_HDRSZ);
+ tet_bs2dtmhdr(tp->tp_buf, &pp->ptm_hdr, DM_HDRSZ);
if (pp->ptm_magic != DTM_MAGIC && pp->ptm_len) {
/* we are probably out of sync with sender */
error(0, "received bad message header,",
@@ -267,7 +267,7 @@ register struct ptab *pp;
rc, msgdata);
tp->tp_cnt += rc;
}
- (void) tet_dmlen2bs(rc, tp->tp_buf);
+ tet_dmlen2bs(rc, tp->tp_buf);
} while (err);
tp->tp_ptr = tp->tp_buf;
pp->pt_flags |= PF_INPROGRESS;
@@ -285,9 +285,9 @@ register struct ptab *pp;
# else
/* just block the signal for now so as to avoid interfering with
another thread's usage of SIGPIPE */
- (void) sigemptyset(&newset);
- (void) sigaddset(&newset, SIGPIPE);
- (void) TET_THR_SIGSETMASK(SIG_BLOCK, &newset, &oldset);
+ sigemptyset(&newset);
+ sigaddset(&newset, SIGPIPE);
+ TET_THR_SIGSETMASK(SIG_BLOCK, &newset, &oldset);
# endif /* TET_THREADS */
do {
@@ -297,7 +297,7 @@ register struct ptab *pp;
} while (rc < 0 && err == SOCKET_EINTR);
# ifndef TET_THREADS
- (void) signal(SIGPIPE, (SIG_FUNC_T (*) ()) pipe_save);
+ signal(SIGPIPE, (SIG_FUNC_T (*) ()) pipe_save);
# else
if (rc < 0 && (err == EPIPE || err == ECONNRESET))
{
@@ -307,14 +307,14 @@ register struct ptab *pp;
chances are very small. Note that we unblock SIGPIPE
explicitly, since it may be a member of "oldset". */
pipe_save = signal(SIGPIPE, SIG_IGN);
- (void) TET_THR_SIGSETMASK(SIG_UNBLOCK, &newset, (sigset_t *) 0);
+ TET_THR_SIGSETMASK(SIG_UNBLOCK, &newset, (sigset_t *) 0);
/* now restore the original mask and handler */
- (void) TET_THR_SIGSETMASK(SIG_SETMASK, &oldset, (sigset_t *) 0);
- (void) signal(SIGPIPE, (SIG_FUNC_T (*) ()) pipe_save);
+ TET_THR_SIGSETMASK(SIG_SETMASK, &oldset, (sigset_t *) 0);
+ signal(SIGPIPE, (SIG_FUNC_T (*) ()) pipe_save);
}
else
- (void) TET_THR_SIGSETMASK(SIG_SETMASK, &oldset, (sigset_t *) 0);
+ TET_THR_SIGSETMASK(SIG_SETMASK, &oldset, (sigset_t *) 0);
# endif /* TET_THREADS */
/* set state and flags according to results */
@@ -441,7 +441,7 @@ register struct ptab *pp;
TRACE2(tet_Tio, 4, "tet_ts_dead: close sd %s", tet_i2a(tp->tp_sd));
- (void) SOCKET_CLOSE(tp->tp_sd);
+ SOCKET_CLOSE(tp->tp_sd);
tp->tp_sd = INVALID_SOCKET;
pp->pt_flags &= ~(PF_CONNECTED | PF_INPROGRESS);
}
diff --git a/src/tet3/servlib/fio.c b/src/tet3/servlib/fio.c
index 96f9769d..da666ab5 100644
--- a/src/tet3/servlib/fio.c
+++ b/src/tet3/servlib/fio.c
@@ -351,7 +351,7 @@ register struct ptab *pp;
done = 1;
for (ftp = ftab; ftp; ftp = ftp->ft_next)
if (ftp->ft_ptab == pp) {
- (void) dofclose(ftp);
+ dofclose(ftp);
done = 0;
break;
}
@@ -416,7 +416,7 @@ register struct ftab *ftp;
if (ftp) {
if (ftp->ft_fp)
- (void) fclose(ftp->ft_fp);
+ fclose(ftp->ft_fp);
if (ftp->ft_name) {
TRACE2(tet_Tbuf, 6, "free ftab fname = %s",
tet_i2x(ftp->ft_name));
diff --git a/src/tet3/servlib/logon.c b/src/tet3/servlib/logon.c
index 72c6e6c0..b2424ccf 100644
--- a/src/tet3/servlib/logon.c
+++ b/src/tet3/servlib/logon.c
@@ -140,7 +140,7 @@ register struct ptab *pp;
error(0, "wanted to log on to", tet_ptptype(wantptype));
error(0, "but found", tet_r2a(&pp->pt_rid));
if (pp->pt_flags & PF_LOGGEDON)
- (void) tet_ti_logoff(pp, 1);
+ tet_ti_logoff(pp, 1);
tet_ts_dead(pp);
}
diff --git a/src/tet3/servlib/smain.c b/src/tet3/servlib/smain.c
index d9ab41dc..ef03a613 100644
--- a/src/tet3/servlib/smain.c
+++ b/src/tet3/servlib/smain.c
@@ -89,10 +89,10 @@ char **argv;
if (needtetroot) {
if (argc > 0)
- (void) sprintf(tet_root, "%.*s",
+ sprintf(tet_root, "%.*s",
(int) sizeof tet_root - 1, *argv);
else {
- (void) sprintf(buf, "%.14s [options] tetrootdir",
+ sprintf(buf, "%.14s [options] tetrootdir",
tet_progname);
fatal(0, "usage:", buf);
}
diff --git a/src/tet3/servlib/sproc.c b/src/tet3/servlib/sproc.c
index 805bd045..5121abdb 100644
--- a/src/tet3/servlib/sproc.c
+++ b/src/tet3/servlib/sproc.c
@@ -269,11 +269,11 @@ register struct ptab *pp;
register struct avmsg *mp = (struct avmsg *) pp->ptm_data;
register int n;
- (void) printf("%s: call to op_print(): argc = %d\n",
+ printf("%s: call to op_print(): argc = %d\n",
tet_progname, mp->av_argc);
for (n = 0; n < (int) mp->av_argc; n++)
- (void) printf("%s\n", mp->av_argv[n]);
- (void) fflush(stdout);
+ printf("%s\n", mp->av_argv[n]);
+ fflush(stdout);
pp->ptm_rc = ER_OK;
pp->ptm_mtype = MT_NODATA;
diff --git a/src/tet3/servlib/tctalk.c b/src/tet3/servlib/tctalk.c
index 5cf8e06c..cdd07cda 100644
--- a/src/tet3/servlib/tctalk.c
+++ b/src/tet3/servlib/tctalk.c
@@ -149,7 +149,7 @@ int sysid;
/* do the rest of the logon processing */
if (tc_l3(pp) < 0) {
- (void) tet_ti_logoff(pp, 0);
+ tet_ti_logoff(pp, 0);
return(-1);
}
diff --git a/src/tet3/servlib/tcxconf.c b/src/tet3/servlib/tcxconf.c
index 9e61fd00..b49bfc87 100644
--- a/src/tet3/servlib/tcxconf.c
+++ b/src/tet3/servlib/tcxconf.c
@@ -174,7 +174,7 @@ register struct cflist *mlp, *vlp;
for (cp1 = vlp->cf_conf; cp1 < vlp->cf_conf + vlp->cf_nconf; cp1++) {
if (tet_remvar(*cp1, -1) != *cp1)
continue;
- (void) sprintf(buf, fmt, sysid % 1000,
+ sprintf(buf, fmt, sysid % 1000,
sizeof buf - sizeof fmt, *cp1);
if (BUFCHK((char **) &tcfg.cf_conf, &tcfg.cf_lconf, (int) ((tcfg.cf_nconf + 1) * sizeof *tcfg.cf_conf)) < 0)
return(-1);
diff --git a/src/tet3/servlib/titcmenv.c b/src/tet3/servlib/titcmenv.c
index 47eed3e0..e585d681 100644
--- a/src/tet3/servlib/titcmenv.c
+++ b/src/tet3/servlib/titcmenv.c
@@ -82,19 +82,19 @@ register int *sname, nsname;
#endif
/* start with the sysid and parent sysid arguments */
- (void) sprintf(sysidstr, "%d", tet_mysysid);
- (void) sprintf(psysidstr, "%d", psysid);
+ sprintf(sysidstr, "%d", tet_mysysid);
+ sprintf(psysidstr, "%d", psysid);
needlen = sizeof envname + strlen(sysidstr) + strlen(psysidstr) + 6;
/* add the snid argument */
if (snid >= 0L) {
- (void) sprintf(snidstr, "%ld", snid);
+ sprintf(snidstr, "%ld", snid);
needlen += strlen(snidstr) + 3;
}
/* add the xrid argument */
if (xrid >= 0L) {
- (void) sprintf(xridstr, "%ld", xrid);
+ sprintf(xridstr, "%ld", xrid);
needlen += strlen(xridstr) + 3;
}
diff --git a/src/tet3/servlib/xdxfile.c b/src/tet3/servlib/xdxfile.c
index 3737c899..ddeaa17c 100644
--- a/src/tet3/servlib/xdxfile.c
+++ b/src/tet3/servlib/xdxfile.c
@@ -95,7 +95,7 @@ char *ifile, *ofile;
/* open the transfer file on the master system */
if ((xfid = xd_tfopen(ofile, (int) stbuf.st_mode)) < 0) {
- (void) fclose(ifp);
+ fclose(ifp);
return(-1);
}
@@ -103,7 +103,7 @@ char *ifile, *ofile;
rc = xd_wrloop(ifp, xfid, ifile);
/* close the local file and the transfer file on the master system */
- (void) fclose(ifp);
+ fclose(ifp);
return(xd_tfclose(xfid) < 0 ? -1 : rc);
}
diff --git a/src/tet3/tcc/config.c b/src/tet3/tcc/config.c
index d46a359e..6a16ae90 100644
--- a/src/tet3/tcc/config.c
+++ b/src/tet3/tcc/config.c
@@ -389,7 +389,7 @@ struct cflist *lp;
proccfline(buf, lp, lcount, fname);
}
- (void) fclose(fp);
+ fclose(fp);
}
/*
@@ -407,7 +407,7 @@ int lineno;
/* check the format of the config line */
if (!tet_equindex(line) || !tet_remvar(line, -1)) {
- (void) sprintf(msg, fmt, lineno);
+ sprintf(msg, fmt, lineno);
error(0, msg, fname);
conferrors++;
return;
@@ -487,7 +487,7 @@ int mode;
return;
/* here to add a default value of !TET_OUTPUT_CAPTURE */
- (void) sprintf(line, "%s=%s", name,
+ sprintf(line, "%s=%s", name,
getmcflag("TET_OUTPUT_CAPTURE", mode) ? "False" : "True");
proccfl2(line, &MCFLIST(mode));
}
@@ -511,7 +511,7 @@ int mode;
return;
/* here to add a default value of TET_OUTPUT_CAPTURE */
- (void) sprintf(line, "%s=%s", name,
+ sprintf(line, "%s=%s", name,
getmcflag("TET_OUTPUT_CAPTURE", mode) ? "True" : "False");
proccfl2(line, &MCFLIST(mode));
}
@@ -634,7 +634,7 @@ void distcfg()
for (dvp = dvar; dvp < dvar + Ndvar; dvp++) {
if (!dvp->dv_value || !*dvp->dv_value)
continue;
- (void) sprintf(buf, "%s=%.*s",dvp->dv_name,
+ sprintf(buf, "%s=%.*s",dvp->dv_name,
(int) sizeof buf - dvp->dv_len - 1,
dvp->dv_value);
proccfl2(buf, &CFLIST(sp, CONF_DIST));
@@ -722,7 +722,7 @@ void distcfg()
if (sysid == 0)
ASSERT(isabspathloc(p));
else if (!isabspathrem(p)) {
- (void) sprintf(buf, fmt1,
+ sprintf(buf, fmt1,
dvp->dv_name, sysid);
error(0, buf, "is not an "
"absolute path name");
@@ -731,7 +731,7 @@ void distcfg()
}
}
else if (dvp->dv_needed) {
- (void) sprintf(buf, fmt2, dvp->dv_name);
+ sprintf(buf, fmt2, dvp->dv_name);
error(0, buf, tet_i2a(sysid));
conferrors++;
}
@@ -899,7 +899,7 @@ void doconfig()
for (cp = lp->cf_conf; cp < lp->cf_conf + lp->cf_nconf; cp++) {
if (!*cp)
continue;
- (void) sprintf(buf, fmt, sysid % 1000,
+ sprintf(buf, fmt, sysid % 1000,
(int) (sizeof buf - sizeof fmt), *cp);
RBUFCHK((char **) &tmp.cf_conf, &tmp.cf_lconf,
(int) ((tmp.cf_nconf + 1) * sizeof *tmp.cf_conf));
@@ -1106,7 +1106,7 @@ int mode;
/* make sure that the remote config file is accessible */
if (tcc_access(sp->sy_sysid, fname, 04) < 0) {
- (void) sprintf(msg, fmt1, prcfmode(mode), MAXPATH, fname);
+ sprintf(msg, fmt1, prcfmode(mode), MAXPATH, fname);
error(errno ? errno : tet_tcerrno, msg, tet_i2a(sp->sy_sysid));
conferrors++;
return;
@@ -1137,7 +1137,7 @@ int mode;
/* perform a config variable exchange with the remote system */
if (tet_tcxconfig(sp->sy_sysid, fname, tp, &vopts, to) < 0) {
- (void) sprintf(msg, fmt2, prcfmode(mode));
+ sprintf(msg, fmt2, prcfmode(mode));
error(tet_tcerrno, msg, tet_i2a(sp->sy_sysid));
conferrors++;
}
@@ -1215,7 +1215,7 @@ int mode;
case 'f':
break;
default:
- (void) sprintf(msg, fmt, vp->bv_name,
+ sprintf(msg, fmt, vp->bv_name,
prcfmode(mode));
error(0, msg, tet_i2a(sysid));
conferrors++;
@@ -1293,7 +1293,7 @@ static void reportdcfg()
lp = &CFLIST(sp, CONF_DIST);
for (cp = lp->cf_conf; cp < lp->cf_conf + lp->cf_nconf; cp++) {
RBUFCHK(&buf, &buflen, (int) strlen(*cp) + 12);
- (void) sprintf(buf, "TET_REM%03d_%s",
+ sprintf(buf, "TET_REM%03d_%s",
sysid % 1000, *cp);
jnl_cfg(buf);
}
@@ -1372,11 +1372,11 @@ char *fname, *type;
}
/* write out the variables */
- (void) fprintf(fp, "# %s configuration variables\n\n", type);
+ fprintf(fp, "# %s configuration variables\n\n", type);
for (cp = lp->cf_conf; cp < lp->cf_conf + lp->cf_nconf; cp++)
if (fprintf(fp, "%s\n", *cp) < 0) {
error(errno, "write error on", fname);
- (void) fclose(fp);
+ fclose(fp);
return(-1);
}
@@ -1509,7 +1509,7 @@ struct cfstack *stp;
p = tet_equindex(*cp);
ASSERT(*p == '=');
*p = '\0';
- (void) sprintf(msg, fmt, *cp);
+ sprintf(msg, fmt, *cp);
*p = '=';
error(0, msg,
"variable assignment in the distributed configuration");
@@ -1633,7 +1633,7 @@ struct cfstack *stp;
len += (int) strlen(p);
buflen = (int) strlen(*cp) + 1;
RBUFCHK(cp, &buflen, len);
- (void) sprintf(*cp, "%s=%s%s%s", name, head, p ? p : "", tail);
+ sprintf(*cp, "%s=%s%s%s", name, head, p ? p : "", tail);
TRACE2(tet_Ttcc, 8, "cve3(): assignment after expansion: \"%s\"", *cp);
}
@@ -1692,7 +1692,7 @@ struct cfstack *stp1;
p = cve3_opmode(name, var, mmm, sysid, mode, stp1);
if (!p) {
- (void) sprintf(msg, fmt, fullvar);
+ sprintf(msg, fmt, fullvar);
cve_error(name, mode, sysid, msg);
}
@@ -1889,18 +1889,18 @@ int mode, sysid;
if (mode == CONF_DIST) {
p = "Distributed";
- (void) sprintf(msg2, conf);
+ sprintf(msg2, conf);
}
else {
p = prcfmode(mode);
if (sysid < 0) {
- (void) sprintf(msg2, "%s %s", p, conf);
+ sprintf(msg2, "%s %s", p, conf);
p = "master";
}
else
- (void) sprintf(msg2, fmt2, conf, sysid);
+ sprintf(msg2, fmt2, conf, sysid);
}
- (void) sprintf(msg1, fmt1, text, name, p);
+ sprintf(msg1, fmt1, text, name, p);
error(0, msg1, msg2);
conferrors++;
@@ -2221,7 +2221,7 @@ int sysid;
ASSERT(IS_CFSETUP(sp, CONF_DIST));
lp = &CFLIST(sp, CONF_DIST);
- (void) sprintf(buf, "%s=%.*s", name,
+ sprintf(buf, "%s=%.*s", name,
(int) sizeof buf - (int) strlen(name) - 2, value);
proccfl2(buf, lp);
}
@@ -2416,7 +2416,7 @@ int mode;
case CONF_DIST:
return("DIST");
default:
- (void) sprintf(msg, "%s%d", text, mode);
+ sprintf(msg, "%s%d", text, mode);
return(msg);
}
}
@@ -2478,7 +2478,7 @@ int opmode;
ASSERT(TCFNAME(cfmode));
if (BUFCHK(&var, &lvar, (int) (sizeof envname + strlen(TCFNAME(cfmode)) + 1)) < 0)
return(-1);
- (void) sprintf(var, "%s=%s", envname, TCFNAME(cfmode));
+ sprintf(var, "%s=%s", envname, TCFNAME(cfmode));
/* put the variable in the environment */
if (tet_putenv(var) < 0)
@@ -2499,7 +2499,7 @@ int opmode;
static void confgiveup()
{
- (void) fprintf(stderr,
+ fprintf(stderr,
"%s: giving up after %d configuration error%s\n",
tet_progname, conferrors, conferrors == 1 ? "" : "s");
tcc_exit(1);
@@ -2518,16 +2518,16 @@ void config_cleanup()
for (fname = tcfname; fname < &tcfname[Ntcfname]; fname++)
if (*fname)
- (void) UNLINK(*fname);
+ UNLINK(*fname);
#else /* -START-LITE-CUT- */
if (ecfname)
- (void) UNLINK(ecfname);
+ UNLINK(ecfname);
if (dcfname)
- (void) UNLINK(dcfname);
+ UNLINK(dcfname);
if (ccfname)
- (void) UNLINK(ccfname);
+ UNLINK(ccfname);
#endif /* TET_LITE */ /* -END-LITE-CUT- */
diff --git a/src/tet3/tcc/copysave.c b/src/tet3/tcc/copysave.c
index 5c16d311..bab53e9b 100644
--- a/src/tet3/tcc/copysave.c
+++ b/src/tet3/tcc/copysave.c
@@ -96,7 +96,7 @@ void rtlcopy()
/* do the copy */
errno = 0;
if (tet_fcopy(tet_tsroot, dest) < 0) {
- (void) sprintf(msg, fmt, MAXPATH, tet_tsroot, MAXPATH, dest);
+ sprintf(msg, fmt, MAXPATH, tet_tsroot, MAXPATH, dest);
fatal(errno, msg, "the local system");
}
@@ -151,7 +151,7 @@ char *rtdir;
/* do the copy */
errno = 0;
if (tet_tcrcopy(sysid, tsroot, dest) < 0) {
- (void) sprintf(msg, fmt, MAXPATH, tsroot, MAXPATH, dest);
+ sprintf(msg, fmt, MAXPATH, tsroot, MAXPATH, dest);
if (!IS_ER_ERRNO(tet_tcerrno))
errno = 0;
fatal(errno ? errno : tet_tcerrno, msg, tet_i2a(sysid));
@@ -235,7 +235,7 @@ char tdir[];
/* here to create the tmpdir */
errno = 0;
if (tcc_mkdir(sysid, tdir) < 0) {
- (void) sprintf(msg, fmt, MAXPATH, tdir);
+ sprintf(msg, fmt, MAXPATH, tdir);
fatal(errno ? errno : tet_tcerrno, msg, tet_i2a(sysid));
}
@@ -398,7 +398,7 @@ char *from, *to;
err = IS_ER_ERRNO(tet_tcerrno) ? errno : tet_tcerrno;
#endif /* TET_LITE */ /* -END-LITE-CUT- */
if (rc < 0) {
- (void) sprintf(msg, fmt, MAXPATH, from);
+ sprintf(msg, fmt, MAXPATH, from);
prperror(prp, *prp->pr_sys, err, msg, to);
return(-1);
}
@@ -459,7 +459,7 @@ struct systab *sp;
/* create the results directory on the remote system if necessary */
if (tet_tcmkalldirs(sp->sy_sysid, resroot) < 0) {
- (void) sprintf(msg, fmt, "",
+ sprintf(msg, fmt, "",
sizeof msg - sizeof fmt, resroot);
if (!IS_ER_ERRNO(tet_tcerrno))
errno = 0;
@@ -469,7 +469,7 @@ struct systab *sp;
/* create the saved files directory on the remote system */
if ((sfdir = tet_tcmksdir(sp->sy_sysid, resroot, resdirsuffix())) == (char *) 0) {
- (void) sprintf(msg, fmt, below,
+ sprintf(msg, fmt, below,
sizeof msg - sizeof fmt - sizeof below, resroot);
error(tet_tcerrno, msg, tet_i2a(sp->sy_sysid));
return(-1);
@@ -548,7 +548,7 @@ int nsfiles;
prp->pr_currmode);
if (tsfiles) {
- (void) sprintf(subdir, remote, *prp->pr_sys % 1000);
+ sprintf(subdir, remote, *prp->pr_sys % 1000);
fullpath(resdirname(), subdir, path, sizeof path,
*prp->pr_sys ? 1 : 0);
tcexecdir(prp, path, savedir, sizeof savedir);
@@ -571,7 +571,7 @@ int nsfiles;
#endif /* TET_LITE */ /* -END-LITE-CUT- */
if (rc < 0) {
- (void) sprintf(msg, fmt, MAXPATH, prp->pr_tcedir, *prp->pr_sys);
+ sprintf(msg, fmt, MAXPATH, prp->pr_tcedir, *prp->pr_sys);
prperror(prp, tsfiles ? 0 : *prp->pr_sys, tet_tcerrno,
msg, savedir);
}
diff --git a/src/tet3/tcc/dtcc.c b/src/tet3/tcc/dtcc.c
index edff0fd8..d0b474be 100644
--- a/src/tet3/tcc/dtcc.c
+++ b/src/tet3/tcc/dtcc.c
@@ -238,7 +238,7 @@ static int tccdlogon()
dir = getdcfg("TET_ROOT", sysid);
ASSERT(dir && *dir);
if (tcc_access(sysid, dir, 04) < 0) {
- (void) sprintf(msg, fmt,
+ sprintf(msg, fmt,
sizeof msg - sizeof fmt, dir);
error(errno, msg, tet_i2a(sysid));
return(-1);
@@ -246,7 +246,7 @@ static int tccdlogon()
dir = getdcfg("TET_TSROOT", sysid);
ASSERT(dir && *dir);
if (tcc_access(sysid, dir, 04) < 0) {
- (void) sprintf(msg, fmt,
+ sprintf(msg, fmt,
sizeof msg - sizeof fmt, dir);
error(errno, msg, tet_i2a(sysid));
return(-1);
diff --git a/src/tet3/tcc/environ.c b/src/tet3/tcc/environ.c
index 1620d361..354daac2 100644
--- a/src/tet3/tcc/environ.c
+++ b/src/tet3/tcc/environ.c
@@ -106,14 +106,14 @@ struct systab *sp;
for (cvp = comvar; cvp < comvar + Ncomvar; cvp++) {
if ((val = getdcfg(*cvp, sp->sy_sysid)) == (char *) 0)
val = "";
- (void) sprintf(buf, "%s=%.*s", *cvp,
+ sprintf(buf, "%s=%.*s", *cvp,
(int) sizeof buf - (int) strlen(*cvp) - 2, val);
ASSERT(ep < &envstr[Nenvstr]);
*ep++ = rstrstore(buf);
}
/* then add in TET_CODE */
- (void) sprintf(buf, "TET_CODE=%.*s", MAXPATH, sp->sy_rcfname);
+ sprintf(buf, "TET_CODE=%.*s", MAXPATH, sp->sy_rcfname);
ASSERT(ep < &envstr[Nenvstr]);
*ep++ = rstrstore(buf);
diff --git a/src/tet3/tcc/error.c b/src/tet3/tcc/error.c
index 7fcd3a9c..fcd76fb6 100644
--- a/src/tet3/tcc/error.c
+++ b/src/tet3/tcc/error.c
@@ -86,8 +86,8 @@ void tcc_error(int errnum, const char *file, int line, const char *s1,
if (jnl_usable())
jnl_tcc_msg(msg);
else {
- (void) fprintf(stderr, "%s %s\n", tet_progname, msg);
- (void) fflush(stderr);
+ fprintf(stderr, "%s %s\n", tet_progname, msg);
+ fflush(stderr);
}
}
@@ -116,7 +116,7 @@ void tcc_prperror(struct proctab *prp, int sysid, int errnum, const char *file,
/* format the message */
if (sysid >= 0)
- (void) sprintf(text, fmt, sysid);
+ sprintf(text, fmt, sysid);
else
text[0] = '\0';
errfmt(errnum, file, line, s1, s2, text, msg);
@@ -136,7 +136,7 @@ static void errfmt(int errnum, const char *file, int line, const char *s1,
register char *p = msg;
/* generate the source file and line number */
- (void) sprintf(p, "(%s, %d): ", file, line);
+ sprintf(p, "(%s, %d): ", file, line);
p += strlen(p);
/* append the first message string */
diff --git a/src/tet3/tcc/exec.c b/src/tet3/tcc/exec.c
index ba53100c..03597d0b 100644
--- a/src/tet3/tcc/exec.c
+++ b/src/tet3/tcc/exec.c
@@ -90,7 +90,7 @@ char *path, **argv, *tcdir, *outfile;
sp = syfind(*prp->pr_sys);
ASSERT(sp);
if (sp->sy_activity != prp->pr_activity) {
- (void) sprintf(buf, fmt, prp->pr_activity);
+ sprintf(buf, fmt, prp->pr_activity);
TRACE3(tet_Ttcc, 6, "putenv \"%s\" on system %s",
buf, tet_i2a(*prp->pr_sys));
if (tcc_putenv(*prp->pr_sys, buf) < 0) {
diff --git a/src/tet3/tcc/jnlproc.c b/src/tet3/tcc/jnlproc.c
index 8417b9c2..c45a571e 100644
--- a/src/tet3/tcc/jnlproc.c
+++ b/src/tet3/tcc/jnlproc.c
@@ -132,7 +132,7 @@ struct proctab *prp;
if ((fp = open_xresdfile(prp)) != (FILE *) 0) {
TRACE2(tet_Ttcc, 6, "using XRESD file %s", prp->pr_xfname);
rc = jp_xres(prp, fp, prp->pr_xfname);
- (void) fclose(fp);
+ fclose(fp);
}
else
#endif /* !TET_LITE */ /* -END-LITE-CUT- */
@@ -185,7 +185,7 @@ struct proctab *prp;
||
(getremfile(prp, prp->pr_tetxres, tet_basename(fname)) < 0)
) {
- (void) UNLINK(fname);
+ UNLINK(fname);
return(-1);
}
}
@@ -208,7 +208,7 @@ struct proctab *prp;
/* process it */
rc = jp_xres(prp, fp, prp->pr_tetxres);
- (void) fclose(fp);
+ fclose(fp);
#ifndef TET_LITE /* -START-LITE-CUT- */
@@ -217,7 +217,7 @@ struct proctab *prp;
** from a remote system, unlink it now
*/
if (fname != prp->pr_tetxres)
- (void) UNLINK(fname);
+ UNLINK(fname);
#endif /* !TET_LITE */ /* -END-LITE-CUT- */
return(rc);
@@ -265,7 +265,7 @@ char *fname;
#endif /* !TET_LITE */ /* -END-LITE-CUT- */
) {
tpno = -1;
- (void) sscanf(flds[1], "%*s %d", &tpno);
+ sscanf(flds[1], "%*s %d", &tpno);
if (jp_reorder(prp, fp, fname, tpno, line, buf) < 0)
rc = -1;
}
@@ -311,14 +311,14 @@ int tpno;
}
switch (id = atoi(flds[0])) {
case TET_JNL_TP_RESULT:
- (void) sscanf(flds[1], "%*s %*s %d", &result);
+ sscanf(flds[1], "%*s %*s %d", &result);
done = 1;
break;
case TET_JNL_IC_START:
case TET_JNL_IC_END:
case TET_JNL_TP_START:
line[0] = '\0';
- (void) fseek(fp, offs, SEEK_SET);
+ fseek(fp, offs, SEEK_SET);
done = 1;
break;
}
@@ -331,7 +331,7 @@ int tpno;
lp1->xr_block = 0L;
lp1->xr_sequence = 0L;
if (id == TET_JNL_TC_INFO)
- (void) sscanf(flds[1], "%*s %*s %ld %ld %ld",
+ sscanf(flds[1], "%*s %*s %ld %ld %ld",
&lp1->xr_context, &lp1->xr_block,
&lp1->xr_sequence);
lp1->xr_id = id;
@@ -547,7 +547,7 @@ struct proctab *prp;
if (fgets(buf, sizeof buf, fp) == (char *) 0) {
TRACE2(tet_Ttcc, 6, "open_xresdfile(): %s is empty",
prp->pr_xfname);
- (void) fclose(fp);
+ fclose(fp);
return((FILE *) 0);
}
diff --git a/src/tet3/tcc/journal.c b/src/tet3/tcc/journal.c
index 79f9156f..93e29152 100644
--- a/src/tet3/tcc/journal.c
+++ b/src/tet3/tcc/journal.c
@@ -231,7 +231,7 @@ struct proctab *prp;
return(-1);
}
else if (tet_fioclex(FILENO(fp)) < 0) {
- (void) fclose(fp);
+ fclose(fp);
return(-1);
}
@@ -264,11 +264,11 @@ char *dir, *prefix;
int fd;
for (try = 0; try < trymax; try++) {
- (void) sprintf(fname, fmt, (int) sizeof fname - 14,
+ sprintf(fname, fmt, (int) sizeof fname - 14,
dir, prefix, tet_mypid, salt);
errno = 0;
if ((fd = OPEN(fname, O_WRONLY|O_CREAT|O_EXCL, MODEANY)) >= 0)
- (void) CLOSE(fd);
+ CLOSE(fd);
if (fd >= 0 || errno != EEXIST)
return(fname);
for (p = &salt[sizeof salt - 2]; p >= salt; p--)
@@ -307,7 +307,7 @@ char **argv;
int sp;
/* generate the first part */
- (void) sprintf(s1, "%s %s %s", tcc_version,
+ sprintf(s1, "%s %s %s", tcc_version,
jnl_time(now), jnl_date(now));
/* determine the user id and name */
@@ -321,7 +321,7 @@ char **argv;
}
/* generate the second part */
- (void) sprintf(p2, "User: %s (%d) TCC Start, Command line:",
+ sprintf(p2, "User: %s (%d) TCC Start, Command line:",
user, (int) uid);
p2 += strlen(p2);
@@ -391,7 +391,7 @@ void jnl_uname()
return;
}
- (void) sprintf(s1, "%.*s %.*s %.*s %.*s %.*s",
+ sprintf(s1, "%.*s %.*s %.*s %.*s %.*s",
(int) sizeof uts.sysname, uts.sysname,
(int) sizeof uts.nodename, uts.nodename,
(int) sizeof uts.release, uts.release,
@@ -413,7 +413,7 @@ register struct proctab *prp;
register char *p;
register int needlen;
- (void) sprintf(s1, "%d %.*s %s", prp->pr_activity,
+ sprintf(s1, "%d %.*s %s", prp->pr_activity,
MAXPATH, prp->pr_scen->sc_tcname, jnl_time(time((time_t *) 0)));
needlen = sizeof s2p1fmt + REFSZ;
@@ -423,10 +423,10 @@ register struct proctab *prp;
RBUFCHK(&s2, &s2len, needlen);
p = s2;
- (void) sprintf(p, s2p1fmt, jnl_scenref(prp));
+ sprintf(p, s2p1fmt, jnl_scenref(prp));
if (prp->pr_exiclist) {
p += strlen(p);
- (void) sprintf(p, s2p2fmt, prp->pr_exiclist);
+ sprintf(p, s2p2fmt, prp->pr_exiclist);
}
jnl_write(TET_JNL_INVOKE_TC, s1, s2, prp->pr_jfp, prp->pr_jfname);
@@ -439,7 +439,7 @@ int mode;
{
char s1[MAXPATH + LONUMSZ + 2];
- (void) sprintf(s1, "%.*s %s", MAXPATH, fname, jnl_mode(mode));
+ sprintf(s1, "%.*s %s", MAXPATH, fname, jnl_mode(mode));
jnl_cfg_start(s1);
}
@@ -452,7 +452,7 @@ int sysid, mode;
static char fmt[] = "remote_%03d %s";
char s1[sizeof fmt + LNUMSZ + LONUMSZ];
- (void) sprintf(s1, fmt, sysid, jnl_mode(mode));
+ sprintf(s1, fmt, sysid, jnl_mode(mode));
jnl_cfg_start(s1);
}
@@ -522,9 +522,9 @@ struct proctab *prp;
static char fmt[] = "TC End, %s";
char s2[sizeof fmt + REFSZ];
- (void) sprintf(s1, "%d %d %s", prp->pr_activity, prp->pr_jnlstatus,
+ sprintf(s1, "%d %d %s", prp->pr_activity, prp->pr_jnlstatus,
jnl_time(time((time_t *) 0)));
- (void) sprintf(s2, fmt, jnl_scenref(prp));
+ sprintf(s2, fmt, jnl_scenref(prp));
jnl_write(TET_JNL_TC_END, s1, s2, prp->pr_jfp, prp->pr_jfname);
jnl_itrace(TET_JNL_TC_END, s1, s2);
}
@@ -554,7 +554,7 @@ struct proctab *prp;
static char fmt[] = "Build Start, %s";
char s2[sizeof fmt + REFSZ];
- (void) sprintf(s2, fmt, jnl_scenref(prp));
+ sprintf(s2, fmt, jnl_scenref(prp));
jnl_bc_start(prp, TET_JNL_BUILD_START, s2);
}
@@ -564,7 +564,7 @@ struct proctab *prp;
static char fmt[] = "Clean Start, %s";
char s2[sizeof fmt + REFSZ];
- (void) sprintf(s2, fmt, jnl_scenref(prp));
+ sprintf(s2, fmt, jnl_scenref(prp));
jnl_bc_start(prp, TET_JNL_CLEAN_START, s2);
}
@@ -575,7 +575,7 @@ char *s2;
{
char s1[LNUMSZ + MAXPATH + TIMESZ + 3];
- (void) sprintf(s1, "%d %.*s %s", prp->pr_activity, MAXPATH,
+ sprintf(s1, "%d %.*s %s", prp->pr_activity, MAXPATH,
prp->pr_scen->sc_tcname, jnl_time(time((time_t *) 0)));
jnl_write(id, s1, s2, prp->pr_jfp, prp->pr_jfname);
@@ -588,7 +588,7 @@ struct proctab *prp;
static char fmt[] = "Build End, %s";
char s2[sizeof fmt + REFSZ];
- (void) sprintf(s2, fmt, jnl_scenref(prp));
+ sprintf(s2, fmt, jnl_scenref(prp));
jnl_bc_end(prp, TET_JNL_BUILD_END, s2);
}
@@ -598,7 +598,7 @@ struct proctab *prp;
static char fmt[] = "Clean End, %s";
char s2[sizeof fmt + REFSZ];
- (void) sprintf(s2, fmt, jnl_scenref(prp));
+ sprintf(s2, fmt, jnl_scenref(prp));
jnl_bc_end(prp, TET_JNL_CLEAN_END, s2);
}
@@ -609,7 +609,7 @@ char *s2;
{
char s1[(LNUMSZ * 2) + TIMESZ + 3];
- (void) sprintf(s1, "%d %d %s", prp->pr_activity, prp->pr_jnlstatus,
+ sprintf(s1, "%d %d %s", prp->pr_activity, prp->pr_jnlstatus,
jnl_time(time((time_t *) 0)));
jnl_write(id, s1, s2, prp->pr_jfp, prp->pr_jfname);
@@ -623,7 +623,7 @@ struct proctab *prp;
char *s1 = tet_i2a(prp->pr_scen->sc_count);
char s2[sizeof fmt + REFSZ];
- (void) sprintf(s2, fmt, jnl_scenref(prp));
+ sprintf(s2, fmt, jnl_scenref(prp));
jnl_write(TET_JNL_PRL_START, s1, s2, prp->pr_jfp, prp->pr_jfname);
}
@@ -633,7 +633,7 @@ struct proctab *prp;
static char fmt[] = "Parallel End, %s";
char s2[sizeof fmt + REFSZ];
- (void) sprintf(s2, fmt, jnl_scenref(prp));
+ sprintf(s2, fmt, jnl_scenref(prp));
jnl_write(TET_JNL_PRL_END, (char *) 0, s2,
prp->pr_jfp, prp->pr_jfname);
}
@@ -645,7 +645,7 @@ struct proctab *prp;
static char fmt[] = "%sSequential Start, %s";
char s2[sizeof fmt + sizeof implied + REFSZ];
- (void) sprintf(s2, fmt,
+ sprintf(s2, fmt,
prp->pr_scen->sc_flags & SCF_IMPLIED ? implied : "",
jnl_scenref(prp));
jnl_write(TET_JNL_SEQ_START, (char *) 0, s2,
@@ -659,7 +659,7 @@ struct proctab *prp;
static char fmt[] = "%sSequential End, %s";
char s2[sizeof fmt + sizeof implied + REFSZ];
- (void) sprintf(s2, fmt,
+ sprintf(s2, fmt,
prp->pr_scen->sc_flags & SCF_IMPLIED ? implied : "",
jnl_scenref(prp));
jnl_write(TET_JNL_SEQ_END, (char *) 0, s2,
@@ -673,7 +673,7 @@ struct proctab *prp;
char *s1 = tet_i2a(prp->pr_scen->sc_count);
char s2[sizeof fmt + REFSZ];
- (void) sprintf(s2, fmt, jnl_scenref(prp));
+ sprintf(s2, fmt, jnl_scenref(prp));
jnl_write(TET_JNL_RPT_START, s1, s2, prp->pr_jfp, prp->pr_jfname);
}
@@ -683,7 +683,7 @@ struct proctab *prp;
static char fmt[] = "Repeat End, %s";
char s2[sizeof fmt + REFSZ];
- (void) sprintf(s2, fmt, jnl_scenref(prp));
+ sprintf(s2, fmt, jnl_scenref(prp));
jnl_write(TET_JNL_RPT_END, (char *) 0, s2,
prp->pr_jfp, prp->pr_jfname);
}
@@ -695,7 +695,7 @@ struct proctab *prp;
char *s1 = tet_l2a(prp->pr_scen->sc_seconds);
char s2[sizeof fmt + REFSZ];
- (void) sprintf(s2, fmt, jnl_scenref(prp));
+ sprintf(s2, fmt, jnl_scenref(prp));
jnl_write(TET_JNL_TLOOP_START, s1, s2, prp->pr_jfp, prp->pr_jfname);
}
@@ -705,7 +705,7 @@ struct proctab *prp;
static char fmt[] = "Timed Loop End, %s";
char s2[sizeof fmt + REFSZ];
- (void) sprintf(s2, fmt, jnl_scenref(prp));
+ sprintf(s2, fmt, jnl_scenref(prp));
jnl_write(TET_JNL_TLOOP_END, (char *) 0, s2,
prp->pr_jfp, prp->pr_jfname);
}
@@ -716,7 +716,7 @@ struct proctab *prp;
static char fmt[] = "Random Start, %s";
char s2[sizeof fmt + REFSZ];
- (void) sprintf(s2, fmt, jnl_scenref(prp));
+ sprintf(s2, fmt, jnl_scenref(prp));
jnl_write(TET_JNL_RND_START, (char *) 0, s2,
prp->pr_jfp, prp->pr_jfname);
}
@@ -727,7 +727,7 @@ struct proctab *prp;
static char fmt[] = "Random End, %s";
char s2[sizeof fmt + REFSZ];
- (void) sprintf(s2, fmt, jnl_scenref(prp));
+ sprintf(s2, fmt, jnl_scenref(prp));
jnl_write(TET_JNL_RND_END, (char *) 0, s2,
prp->pr_jfp, prp->pr_jfname);
}
@@ -741,7 +741,7 @@ struct proctab *prp;
static char fmt[] = "Remote Start, %s";
char s2[sizeof fmt + REFSZ];
- (void) sprintf(s2, fmt, jnl_scenref(prp));
+ sprintf(s2, fmt, jnl_scenref(prp));
jnl_rd_start(prp, TET_JNL_RMT_START, s2);
}
@@ -751,7 +751,7 @@ struct proctab *prp;
static char fmt[] = "Remote End, %s";
char s2[sizeof fmt + REFSZ];
- (void) sprintf(s2, fmt, jnl_scenref(prp));
+ sprintf(s2, fmt, jnl_scenref(prp));
jnl_write(TET_JNL_RMT_END, (char *) 0, s2,
prp->pr_jfp, prp->pr_jfname);
}
@@ -762,7 +762,7 @@ struct proctab *prp;
static char fmt[] = "Distributed Start, %s";
char s2[sizeof fmt + REFSZ];
- (void) sprintf(s2, fmt, jnl_scenref(prp));
+ sprintf(s2, fmt, jnl_scenref(prp));
jnl_rd_start(prp, TET_JNL_DIST_START, s2);
}
@@ -772,7 +772,7 @@ struct proctab *prp;
static char fmt[] = "Distributed End, %s";
char s2[sizeof fmt + REFSZ];
- (void) sprintf(s2, fmt, jnl_scenref(prp));
+ sprintf(s2, fmt, jnl_scenref(prp));
jnl_write(TET_JNL_DIST_END, (char *) 0, s2,
prp->pr_jfp, prp->pr_jfname);
}
@@ -803,7 +803,7 @@ char *s2;
for (ip = ep->sc_sys; ip < ep->sc_sys + ep->sc_nsys; ip++) {
if (ip > ep->sc_sys)
*p++ = ',';
- (void) sprintf(p, "%03d", *ip);
+ sprintf(p, "%03d", *ip);
p += strlen(p);
}
@@ -821,7 +821,7 @@ struct proctab *prp;
register struct scentab *ep = prp->pr_scen;
register char **vp;
- (void) sprintf(s2, fmt, jnl_scenref(prp));
+ sprintf(s2, fmt, jnl_scenref(prp));
jnl_write(TET_JNL_VAR_START, (char *) 0, s2,
prp->pr_jfp, prp->pr_jfname);
for (vp = ep->sc_vars; vp < ep->sc_vars + ep->sc_nvars; vp++)
@@ -834,7 +834,7 @@ struct proctab *prp;
static char fmt[] = "Variable End, %s";
char s2[sizeof fmt + REFSZ];
- (void) sprintf(s2, fmt, jnl_scenref(prp));
+ sprintf(s2, fmt, jnl_scenref(prp));
jnl_write(TET_JNL_VAR_END, (char *) 0, s2,
prp->pr_jfp, prp->pr_jfname);
}
@@ -858,7 +858,7 @@ struct proctab *prp;
char s1[LNUMSZ + sizeof tcc_version + 4];
static char s2[] = "TCM Start (auto-generated by TCC)";
- (void) sprintf(s1, "%d %s 1", prp->pr_activity, tcc_version);
+ sprintf(s1, "%d %s 1", prp->pr_activity, tcc_version);
jnl_write(TET_JNL_TCM_START, s1, s2, prp->pr_jfp, prp->pr_jfname);
}
@@ -885,7 +885,7 @@ char *s2;
{
char s1[LNUMSZ + TIMESZ + 6];
- (void) sprintf(s1, "%d 1 1 %s",
+ sprintf(s1, "%d 1 1 %s",
prp->pr_activity, jnl_time(time((time_t *) 0)));
jnl_write(id, s1, s2, prp->pr_jfp, prp->pr_jfname);
}
@@ -896,7 +896,7 @@ struct proctab *prp;
char s1[LNUMSZ + TIMESZ + 4];
static char s2[] = "TP Start (auto-generated by TCC)";
- (void) sprintf(s1, "%d 1 %s",
+ sprintf(s1, "%d 1 %s",
prp->pr_activity, jnl_time(time((time_t *) 0)));
jnl_write(TET_JNL_TP_START, s1, s2, prp->pr_jfp, prp->pr_jfname);
}
@@ -912,13 +912,13 @@ int tpno, result;
static char s2p2[] = "(auto-generated by TCC)";
int needlen;
- (void) sprintf(s1, "%d %d %d %s", prp->pr_activity, tpno, result,
+ sprintf(s1, "%d %d %d %s", prp->pr_activity, tpno, result,
jnl_time(time((time_t *) 0)));
s2p1 = tet_getresname(result, (int *) 0);
needlen = strlen(s2p1) + sizeof s2p2 + 1;
RBUFCHK(&s2, &s2len, needlen);
- (void) sprintf(s2, "%s %s", s2p1, s2p2);
+ sprintf(s2, "%s %s", s2p1, s2p2);
jnl_write(TET_JNL_TP_RESULT, s1, s2, prp->pr_jfp, prp->pr_jfname);
}
@@ -967,7 +967,7 @@ FILE *fp;
TET_MAX(s2max, 0), s2) < 0 || fflush(fp) < 0) {
error(errno, "write error on", fname);
s2max = (int) sizeof msg - len0 - len1 - 3;
- (void) sprintf(msg, "%s|%.*s|%.*s", s0,
+ sprintf(msg, "%s|%.*s|%.*s", s0,
(int) sizeof msg - len0 - 3, s1,
TET_MAX(s2max, 0), s2);
error(0, "the journal line that cannot be written is:",
@@ -979,9 +979,9 @@ FILE *fp;
if (jnl_usable())
error(0, "the previous journal line has been truncated",
(char *) 0);
- (void) fprintf(stderr, "%s: a journal line has been truncated - the complete line is:\n%s|%s|%s\n",
+ fprintf(stderr, "%s: a journal line has been truncated - the complete line is:\n%s|%s|%s\n",
tet_progname, s0, s1, s2);
- (void) fflush(stderr);
+ fflush(stderr);
}
}
@@ -1021,7 +1021,7 @@ FILE *fp;
while (p > s2 && isspace(*(p - 1)))
p--;
n = (p > s2) ? p - s2 : space;
- (void) sprintf(msg, "%.*s", n, s2);
+ sprintf(msg, "%.*s", n, s2);
jnl_write(id, s1, msg, fp, fname);
s2 += n;
while (isspace(*s2))
@@ -1045,8 +1045,8 @@ int id;
char *s1, *s2;
{
if (tcc_Iflag) {
- (void) fprintf(stderr, "tcc:%d|%s|%s\n", id, s1, s2);
- (void) fflush(stderr);
+ fprintf(stderr, "tcc:%d|%s|%s\n", id, s1, s2);
+ fflush(stderr);
}
}
@@ -1061,7 +1061,7 @@ time_t now;
struct tm *tp = localtime(&now);
static char buf[DATESZ + 1];
- (void) sprintf(buf, "%4.4d%.2d%.2d",
+ sprintf(buf, "%4.4d%.2d%.2d",
tp->tm_year + 1900, tp->tm_mon + 1, tp->tm_mday);
return(buf);
@@ -1078,7 +1078,7 @@ time_t now;
struct tm *tp = localtime(&now);
static char buf[TIMESZ + 1];
- (void) sprintf(buf, "%.2d:%.2d:%.2d",
+ sprintf(buf, "%.2d:%.2d:%.2d",
tp->tm_hour, tp->tm_min, tp->tm_sec);
return(buf);
@@ -1147,7 +1147,7 @@ register struct proctab *prp;
error(errno, werrmsg, prp->pr_jfname);
if (fflush(prp->pr_jfp) < 0)
error(errno, werrmsg, prp->pr_jfname);
- (void) fclose(child->pr_jfp);
+ fclose(child->pr_jfp);
child->pr_jfp = prp->pr_jfp;
if (UNLINK(child->pr_jfname) < 0)
error(errno, "can't unlink", child->pr_jfname);
@@ -1168,7 +1168,7 @@ struct proctab *prp;
{
static char scenref[REFSZ];
- (void) sprintf(scenref, tcc_scenref_fmt,
+ sprintf(scenref, tcc_scenref_fmt,
prp->pr_scen->sc_ref,
prp->pr_sys ? *prp->pr_sys : 0);
diff --git a/src/tet3/tcc/lock.c b/src/tet3/tcc/lock.c
index bb13fb73..8c4dd429 100644
--- a/src/tet3/tcc/lock.c
+++ b/src/tet3/tcc/lock.c
@@ -116,7 +116,7 @@ char *dir, lkname[];
err = errno ? errno : tet_tcerrno;
break;
}
- (void) sprintf(msg, fmt, lktype);
+ sprintf(msg, fmt, lktype);
prperror(prp, *prp->pr_sys, err, msg, lkpath);
return(-1);
}
@@ -124,7 +124,7 @@ char *dir, lkname[];
TRACE4(tet_Ttcc, 4, "created %s lock %s on system %s",
lktype, lnp, tet_i2a(*prp->pr_sys));
- (void) sprintf(lkname, "%.*s", lknamelen, lnp);
+ sprintf(lkname, "%.*s", lknamelen, lnp);
return(0);
}
@@ -153,7 +153,7 @@ char *lkname;
/* remove the lock file */
errno = 0;
if (tcc_unlink(*prp->pr_sys, lkname) < 0) {
- (void) sprintf(msg, fmt, lktype, "");
+ sprintf(msg, fmt, lktype, "");
prperror(prp, *prp->pr_sys, errno ? errno : tet_tcerrno,
msg, lkname);
rc = -1;
@@ -183,7 +183,7 @@ char *lkname;
#endif
break;
default:
- (void) sprintf(msg, fmt, lktype, " directory");
+ sprintf(msg, fmt, lktype, " directory");
prperror(prp, *prp->pr_sys, errno ? errno : tet_tcerrno,
msg, lkdir);
rc = -1;
diff --git a/src/tet3/tcc/proctab.c b/src/tet3/tcc/proctab.c
index 8464ae16..85a9a151 100644
--- a/src/tet3/tcc/proctab.c
+++ b/src/tet3/tcc/proctab.c
@@ -214,7 +214,7 @@ int state;
case PRS_WAIT:
return("WAIT");
default:
- (void) sprintf(msg, "%s%d", text, state);
+ sprintf(msg, "%s%d", text, state);
return(msg);
}
}
@@ -256,7 +256,7 @@ int state;
case TCS_END:
return("END");
default:
- (void) sprintf(msg, "%s%d", text, state);
+ sprintf(msg, "%s%d", text, state);
return(msg);
}
}
@@ -308,7 +308,7 @@ int state;
case PTS_SIGKILL:
return("SIGKILL");
default:
- (void) sprintf(msg, "%s%d", text, state);
+ sprintf(msg, "%s%d", text, state);
return(msg);
}
}
diff --git a/src/tet3/tcc/proctc.c b/src/tet3/tcc/proctc.c
index 576e7775..80161cd0 100644
--- a/src/tet3/tcc/proctc.c
+++ b/src/tet3/tcc/proctc.c
@@ -488,13 +488,13 @@ struct proctab *prp;
timestr = jnl_time(time((time_t *) 0));
ep = prp->pr_scen;
#ifdef TET_LITE /* -LITE-CUT-LINE- */
- (void) printf("%s %-7s %s\n", timestr, action, ep->sc_tcname);
+ printf("%s %-7s %s\n", timestr, action, ep->sc_tcname);
#else /* -START-LITE-CUT- */
for (ip = prp->pr_sys; ip < prp->pr_sys + prp->pr_nsys; ip++)
- (void) printf("%s %-7s %s on system %03d\n",
+ printf("%s %-7s %s on system %03d\n",
timestr, action, ep->sc_tcname, *ip);
#endif /* TET_LITE */ /* -END-LITE-CUT- */
- (void) fflush(stdout);
+ fflush(stdout);
}
/* start a new activity */
@@ -689,7 +689,7 @@ register struct proctab *prp;
/* unlock the execution directory */
if (prp->pr_execlock) {
- (void) tcc_unlock(prp, prp->pr_flags & PRF_SHLOCK,
+ tcc_unlock(prp, prp->pr_flags & PRF_SHLOCK,
prp->pr_execlock);
TRACE2(tet_Tbuf, 6, "free pr_execlock = %s",
tet_i2x(prp->pr_execlock));
@@ -699,7 +699,7 @@ register struct proctab *prp;
/* unlock the source directory */
if (prp->pr_srclock) {
- (void) tcc_unlock(prp, prp->pr_flags & PRF_SHLOCK,
+ tcc_unlock(prp, prp->pr_flags & PRF_SHLOCK,
prp->pr_srclock);
TRACE2(tet_Tbuf, 6, "free pr_srclock = %s",
tet_i2x(prp->pr_srclock));
@@ -1282,25 +1282,25 @@ register struct proctab *prp;
/* perform per-proctab journal end processing */
#ifndef TET_LITE /* -START-LITE-CUT- */
if (prp->pr_flags & PRF_JNL_CHILD) {
- (void) run_child_proctabs(prp, tcs1_jnlend);
+ run_child_proctabs(prp, tcs1_jnlend);
jnl_consolidate(prp);
prp->pr_flags &= ~PRF_JNL_CHILD;
}
else
#endif /* !TET_LITE */ /* -END-LITE-CUT- */
- (void) tcs1_jnlend(prp);
+ tcs1_jnlend(prp);
/* remove the temporary directory if there is one */
- (void) RUN_PROCTABS(prp, tcs1_rmtmpdir);
+ RUN_PROCTABS(prp, tcs1_rmtmpdir);
/* ensure that all locks are removed */
- (void) RUN_PROCTABS(prp, tcs1_unlock);
+ RUN_PROCTABS(prp, tcs1_unlock);
/* free the tet_xres file names */
- (void) RUN_PROCTABS(prp, tcs1_freetetxres);
+ RUN_PROCTABS(prp, tcs1_freetetxres);
/* free the execution directory names */
- (void) RUN_PROCTABS(prp, tcs1_freetcedir);
+ RUN_PROCTABS(prp, tcs1_freetcedir);
#ifdef TET_LITE /* -LITE-CUT-LINE- */
ASSERT(prp->pr_child == (struct proctab *) 0);
@@ -1374,7 +1374,7 @@ struct proctab *prp;
tet_i2x(prp), prpflags(prp->pr_flags));
if (prp->pr_tmpdir) {
- (void) tcc_rmtmpdir(prp, prp->pr_tmpdir);
+ tcc_rmtmpdir(prp, prp->pr_tmpdir);
TRACE2(tet_Tbuf, 6, "free pr_tmpdir = %s",
tet_i2x(prp->pr_tmpdir));
free(prp->pr_tmpdir);
diff --git a/src/tet3/tcc/proctcd.c b/src/tet3/tcc/proctcd.c
index 47b90dfb..c152f7a5 100644
--- a/src/tet3/tcc/proctcd.c
+++ b/src/tet3/tcc/proctcd.c
@@ -106,7 +106,7 @@ register struct proctab *prp;
prperror(prp, -1, tet_xderrno,
"can't send system list to XRESD", (char *) 0);
rm_snid_xrid(prp);
- (void) UNLINK(fname);
+ UNLINK(fname);
return(-1);
}
@@ -240,7 +240,7 @@ void unlink_xres(prp)
struct proctab *prp;
{
if (prp->pr_xfname) {
- (void) UNLINK(prp->pr_xfname);
+ UNLINK(prp->pr_xfname);
TRACE2(tet_Tbuf, 6, "free prp->pr_xfname = %s",
tet_i2x(prp->pr_xfname));
free(prp->pr_xfname);
diff --git a/src/tet3/tcc/rescode.c b/src/tet3/tcc/rescode.c
index f0ebce72..d75f5d14 100644
--- a/src/tet3/tcc/rescode.c
+++ b/src/tet3/tcc/rescode.c
@@ -148,7 +148,7 @@ static void irc2()
fatal(errno, "can't open combined rescode file", rcftmp);
/* write out the default results codes */
- (void) fprintf(fp, "# master results code file\n\n");
+ fprintf(fp, "# master results code file\n\n");
for (rtp = tet_restab; rtp < tet_restab + tet_nrestab; rtp++)
if (fprintf(fp, "%d \"%s\" %s\n", rtp->rt_code, rtp->rt_name,
rtp->rt_abrt ? "Abort" : "Continue") < 0)
@@ -192,7 +192,7 @@ static void rescode_distribute()
*(lines + nlines++) = rstrstore(line);
}
- (void) fclose(fp);
+ fclose(fp);
/* distribute the lines to each remote system */
for (sysid = 1, sysmax = symax(); sysid <= sysmax; sysid++)
@@ -241,7 +241,7 @@ int nlines;
/* open the remote file */
if ((fid = tet_tcfopen(sp->sy_sysid, cfname)) < 0) {
- (void) sprintf(msg, fmt, sizeof msg - sizeof fmt, cfname);
+ sprintf(msg, fmt, sizeof msg - sizeof fmt, cfname);
if (!IS_ER_ERRNO(tet_tcerrno))
errno = 0;
error(errno ? errno : tet_tcerrno, msg, tet_i2a(sp->sy_sysid));
@@ -282,14 +282,14 @@ void rescode_cleanup()
#endif /* !TET_LITE */ /* -END-LITE-CUT- */
/* remove the local tmp result code file */
- (void) UNLINK(rcftmp);
+ UNLINK(rcftmp);
#ifndef TET_LITE /* -START-LITE-CUT- */
/* remove all the remote tmp rescode files */
for (sysid = 1, sysmax = symax(); sysid <= sysmax; sysid++)
if ((sp = syfind(sysid)) != (struct systab *) 0 &&
sp->sy_rcfname)
- (void) tet_tcunlink(sysid, sp->sy_rcfname);
+ tet_tcunlink(sysid, sp->sy_rcfname);
#endif /* !TET_LITE */ /* -END-LITE-CUT- */
}
diff --git a/src/tet3/tcc/resdir.c b/src/tet3/tcc/resdir.c
index 86232bd8..869b894c 100644
--- a/src/tet3/tcc/resdir.c
+++ b/src/tet3/tcc/resdir.c
@@ -143,7 +143,7 @@ char *resroot;
while ((dp = READDIR(dirp)) != (struct dirent *) 0)
if ((thisval = atoi(dp->d_name)) > maxval)
maxval = thisval;
- (void) CLOSEDIR(dirp);
+ CLOSEDIR(dirp);
}
/*
@@ -156,7 +156,7 @@ char *resroot;
/* construct the name of the subdirectory for the selected
modes of operation */
- (void) sprintf(buf, "%04d%s", maxval, resdirsuffix());
+ sprintf(buf, "%04d%s", maxval, resdirsuffix());
return(buf);
}
diff --git a/src/tet3/tcc/rrproc.c b/src/tet3/tcc/rrproc.c
index 3d3ea4f9..bf0b4b0e 100644
--- a/src/tet3/tcc/rrproc.c
+++ b/src/tet3/tcc/rrproc.c
@@ -162,7 +162,7 @@ char *codelist, *old_journal_file;
** and split the codelist into fields
*/
RBUFCHK((char **) &argv, &largv, n * sizeof *argv);
- (void) sprintf(buf, "%.*s", (int) sizeof buf - 1, codelist);
+ sprintf(buf, "%.*s", (int) sizeof buf - 1, codelist);
argc = split(buf, argv, n, ',');
/*
@@ -223,7 +223,7 @@ char *codelist, *old_journal_file;
(jlp = rrp_getline(buf)) == (struct jline *) 0 ||
jlp->jl_id != TET_JNL_TCC_START
) {
- (void) fprintf(stderr, "TCC: old journal file does not start with a TCC Start line: %s\n",
+ fprintf(stderr, "TCC: old journal file does not start with a TCC Start line: %s\n",
jfname);
tcc_exit(1);
}
@@ -270,7 +270,7 @@ char *codelist, *old_journal_file;
case TET_JNL_TP_START:
case TET_JNL_TP_RESULT:
if ((tcc_modes & TCC_RESUME) == 0 || !resume_scen) {
- (void) fprintf(stderr, "TCC: found %s outside the scope of a Test Case at line %ld in old journal file %s\n",
+ fprintf(stderr, "TCC: found %s outside the scope of a Test Case at line %ld in old journal file %s\n",
prjnlid(jlp->jl_id), jlp->jl_lineno,
jfname);
tcc_exit(1);
@@ -299,25 +299,25 @@ char *codelist, *old_journal_file;
case TET_JNL_RMT_END:
case TET_JNL_DIST_END:
#endif /* !TET_LITE */ /* -END-LITE-CUT- */
- (void) rrp_findscen(jlp);
+ rrp_findscen(jlp);
break;
}
}
- (void) fclose(jfp);
+ fclose(jfp);
/*
** see if any test cases have been selected (in RERUN mode) or if
** a resume point has been found (in RESUME mode)
*/
if ((tcc_modes & TCC_RERUN) && !sel) {
- (void) printf("TCC: rerun codelist does not select any test cases to rerun\n");
- (void) fflush(stdout);
+ printf("TCC: rerun codelist does not select any test cases to rerun\n");
+ fflush(stdout);
tcc_exit(0);
}
if ((tcc_modes & TCC_RESUME) && !resume_scen) {
- (void) printf("TCC: resume codelist does not identify a resume point in the scenario\n");
- (void) fflush(stdout);
+ printf("TCC: resume codelist does not identify a resume point in the scenario\n");
+ fflush(stdout);
tcc_exit(0);
}
@@ -353,7 +353,7 @@ struct jline *jlp;
/* ensure that the tcc version number matches our version number */
if (strcmp(jlp->jl_flds2[0], tcc_version)) {
- (void) fprintf(stderr, "TCC version %s: old journal file was generated by a different version of tcc (%s)\n",
+ fprintf(stderr, "TCC version %s: old journal file was generated by a different version of tcc (%s)\n",
tcc_version, jlp->jl_flds2[0]);
tcc_exit(1);
}
@@ -392,7 +392,7 @@ struct jline *jlp;
break;
case 'm':
if (tcc_modes & TCC_RESUME) {
- (void) fprintf(stderr, "TCC: can't RESUME using an old journal file which has been generated by tcc in RESUME mode\n");
+ fprintf(stderr, "TCC: can't RESUME using an old journal file which has been generated by tcc in RESUME mode\n");
tcc_exit(1);
}
break;
@@ -409,7 +409,7 @@ struct jline *jlp;
badynopt(c);
break;
case '?':
- (void) fprintf(stderr, "TCC: TCC Start line in old journal file contains an invalid or incomplete command-line option\n");
+ fprintf(stderr, "TCC: TCC Start line in old journal file contains an invalid or incomplete command-line option\n");
tcc_exit(1);
break;
}
@@ -422,7 +422,7 @@ struct jline *jlp;
(tcc_modes & TCC_RESUME) &&
(tcc_modes & (TCC_BUILD | TCC_EXEC | TCC_CLEAN)) != modes
) {
- (void) fprintf(stderr, "TCC: set of operation modes in old journal file (%s) does not match the set selected for this run (%s)\n",
+ fprintf(stderr, "TCC: set of operation modes in old journal file (%s) does not match the set selected for this run (%s)\n",
prtccmode(modes),
prtccmode(tcc_modes & (TCC_BUILD | TCC_EXEC | TCC_CLEAN)));
tcc_exit(1);
@@ -476,7 +476,7 @@ int *argcp;
if (!strncmp(p1, key, sizeof key - 1))
break;
if (!*p1) {
- (void) fprintf(stderr, "TCC: can't find tcc command in TCC Start line in old journal file\n");
+ fprintf(stderr, "TCC: can't find tcc command in TCC Start line in old journal file\n");
tcc_exit(1);
}
@@ -545,7 +545,7 @@ int *argcp;
static void badynopt(c)
int c;
{
- (void) fprintf(stderr, "TCC: TCC Start line in old journal file contains a bad format -%c option\n", c);
+ fprintf(stderr, "TCC: TCC Start line in old journal file contains a bad format -%c option\n", c);
tcc_exit(1);
}
@@ -563,7 +563,7 @@ struct jline *jlp;
/* find the scenario element corresponding to the scenario reference */
if ((ep = rrp_fs2(sctree->sc_child, jlp->jl_ref)) == (struct scentab *) 0) {
- (void) fprintf(stderr, "TCC: the specified scenario does not contain an element which corresponds to reference %ld-%d at line %ld in old journal file %s\n",
+ fprintf(stderr, "TCC: the specified scenario does not contain an element which corresponds to reference %ld-%d at line %ld in old journal file %s\n",
jlp->jl_ref, jlp->jl_sys, jlp->jl_lineno, jfname);
tcc_exit(1);
}
@@ -647,9 +647,9 @@ struct jline *jlp;
directive = prscdir(ep->sc_directive);
else
directive = "";
- (void) fprintf(stderr, "TCC: %s line %ld in old journal file %s\n",
+ fprintf(stderr, "TCC: %s line %ld in old journal file %s\n",
prjnlid(jlp->jl_id), jlp->jl_lineno, jfname);
- (void) fprintf(stderr, "does not match %s%s%s element at line %d in scenario file %s\n",
+ fprintf(stderr, "does not match %s%s%s element at line %d in scenario file %s\n",
directive, (ep->sc_type == SC_DIRECTIVE) ? " " : "",
prsctype(ep->sc_type), ep->sc_lineno, ep->sc_fname);
tcc_exit(1);
@@ -712,10 +712,10 @@ struct jline *jlp;
ASSERT(is_testcase_start_id);
if (strcmp(ep->sc_tcname, jlp->jl_flds2[1])) {
- (void) fprintf(stderr, "TCC: the test case name (%s) on %s line %ld in old journal file %s\n",
+ fprintf(stderr, "TCC: the test case name (%s) on %s line %ld in old journal file %s\n",
jlp->jl_flds2[1], prjnlid(jlp->jl_id),
jlp->jl_lineno, jfname);
- (void) fprintf(stderr, "does not match the test case name (%s) at line %d of scenario file %s\n",
+ fprintf(stderr, "does not match the test case name (%s) at line %d of scenario file %s\n",
ep->sc_tcname, ep->sc_lineno, ep->sc_fname);
tcc_exit(1);
}
@@ -792,9 +792,9 @@ int startid;
case TET_JNL_TC_END:
case TET_JNL_CLEAN_END:
if (endid != jlp->jl_id) {
- (void) fprintf(stderr, "TCC: expected %s at line %ld in old journal file %s\n",
+ fprintf(stderr, "TCC: expected %s at line %ld in old journal file %s\n",
prjnlid(endid), jlp->jl_lineno, jfname);
- (void) fprintf(stderr,
+ fprintf(stderr,
"instead, found %s line\n",
prjnlid(jlp->jl_id));
tcc_exit(1);
@@ -808,7 +808,7 @@ int startid;
case TET_JNL_IC_END:
case TET_JNL_TP_START:
case TET_JNL_TP_RESULT:
- (void) fprintf(stderr, "TCC: found %s outside the scope of an IC at line %ld in old journal file %s\n",
+ fprintf(stderr, "TCC: found %s outside the scope of an IC at line %ld in old journal file %s\n",
prjnlid(jlp->jl_id), jlp->jl_lineno, jfname);
tcc_exit(1);
break;
@@ -959,7 +959,7 @@ int mode;
done = 1;
break;
case TET_JNL_TP_RESULT:
- (void) fprintf(stderr, "TCC: found %s outside the scope of a TP at line %ld in old journal file %s\n",
+ fprintf(stderr, "TCC: found %s outside the scope of a TP at line %ld in old journal file %s\n",
prjnlid(jlp->jl_id), jlp->jl_lineno, jfname);
tcc_exit(1);
break;
@@ -982,7 +982,7 @@ int mode;
p = tet_i2a(icno);
needlen = len + strlen(p) + 1;
RBUFCHK(&resume_iclist, &tmplen, needlen);
- (void) sprintf(resume_iclist + len - 1, ",%s", p);
+ sprintf(resume_iclist + len - 1, ",%s", p);
}
return(sel);
}
@@ -1004,7 +1004,7 @@ int mode;
resume_mode = mode;
if (mode == TCC_EXEC) {
ASSERT(resume_iclist == (char *) 0);
- (void) sprintf(buf, "%d", icno);
+ sprintf(buf, "%d", icno);
resume_iclist = rstrstore(buf);
TRACE2(tet_Ttcc, 6, "\tresume at IC %s",
resume_iclist);
@@ -1165,7 +1165,7 @@ char *buf;
/* split the line into 3 |-separated fields */
if (jnlproc_split(line, flds, buf) < 0 || !isdigit(*flds[0])) {
- (void) sprintf(line, fmt1, lcount);
+ sprintf(line, fmt1, lcount);
error(0, line, jfname);
continue;
}
@@ -1217,9 +1217,9 @@ char *buf;
/* check the number of subfields in the 2nd field */
if (expflds != nflds2) {
- (void) sprintf(line, fmt2, expflds);
+ sprintf(line, fmt2, expflds);
error(0, line, tet_i2a(nflds2));
- (void) sprintf(line, fmt1, lcount);
+ sprintf(line, fmt1, lcount);
error(0, line, jfname);
continue;
}
@@ -1238,7 +1238,7 @@ char *buf;
case TET_JNL_DIST_START:
#endif /* !TET_LITE */ /* -END-LITE-CUT- */
if (!isdigit(*jline.jl_flds2[0])) {
- (void) sprintf(line, fmt1, lcount);
+ sprintf(line, fmt1, lcount);
error(0, line, jfname);
continue;
}
@@ -1253,7 +1253,7 @@ char *buf;
*jline.jl_flds2[1] == '@'
)
) {
- (void) sprintf(line, fmt1, lcount);
+ sprintf(line, fmt1, lcount);
error(0, line, jfname);
continue;
}
@@ -1268,7 +1268,7 @@ char *buf;
*jline.jl_flds2[1] == '-'
)
) {
- (void) sprintf(line, fmt1, lcount);
+ sprintf(line, fmt1, lcount);
error(0, line, jfname);
continue;
}
@@ -1278,7 +1278,7 @@ char *buf;
!isdigit(*jline.jl_flds2[0]) ||
!isdigit(*jline.jl_flds2[1])
) {
- (void) sprintf(line, fmt1, lcount);
+ sprintf(line, fmt1, lcount);
error(0, line, jfname);
continue;
}
@@ -1291,7 +1291,7 @@ char *buf;
!isdigit(*jline.jl_flds2[1]) ||
!isdigit(*jline.jl_flds2[2])
) {
- (void) sprintf(line, fmt1, lcount);
+ sprintf(line, fmt1, lcount);
error(0, line, jfname);
continue;
}
@@ -1529,7 +1529,7 @@ int icno;
p = tet_i2a(icno);
needlen = strlen(ep->sc_exiclist) + strlen(p) + 2;
RBUFCHK(&iclist, &len, needlen);
- (void) sprintf(iclist, "%s,%s", ep->sc_exiclist, p);
+ sprintf(iclist, "%s,%s", ep->sc_exiclist, p);
exiclist_set(ep, iclist);
}
@@ -1790,7 +1790,7 @@ int id;
case TET_JNL_TCC_END:
return("TCC End");
default:
- (void) sprintf(msg, "%s%d", text, id);
+ sprintf(msg, "%s%d", text, id);
return(msg);
}
}
diff --git a/src/tet3/tcc/scen1.c b/src/tet3/tcc/scen1.c
index 8abba13b..13ac318c 100644
--- a/src/tet3/tcc/scen1.c
+++ b/src/tet3/tcc/scen1.c
@@ -206,7 +206,7 @@ char *fname;
ifstp = ifstack;
while (ifstack) {
if (ifstack->if_next && ifstack->if_fp)
- (void) fclose(ifstack->if_fp);
+ fclose(ifstack->if_fp);
ifsfree(ifspop());
}
@@ -243,7 +243,7 @@ static int find1scen()
/* start of new scenario */
if (skipstart) {
n = ifstp->if_lcount - skipstart;
- (void) sprintf(msg, fmt, n, n == 1 ? "" : "s");
+ sprintf(msg, fmt, n, n == 1 ? "" : "s");
scenermsg(msg, (char *) 0, ifstp->if_lcount,
ifstp->if_fname);
}
@@ -470,7 +470,7 @@ int type, flags, lineno;
lsceninfo = 0;
RBUFCHK(&ep->sc_sceninfo, &lsceninfo,
(int) strlen(element) + 3);
- (void) sprintf(ep->sc_sceninfo, "\"%s\"", element);
+ sprintf(ep->sc_sceninfo, "\"%s\"", element);
break;
case SC_TESTCASE:
tcname = element;
@@ -574,7 +574,7 @@ int lineno;
for (dirp = dirs; dirp < &dirs[ndirs]; dirp++) {
/* count the number of comma-separated arguments
associated with this directive */
- (void) strcpy(buf, *dirp);
+ strcpy(buf, *dirp);
args[0] = "";
nargs = split(buf, args, MAXARGS, ',') - 1;
@@ -1035,7 +1035,7 @@ int currline;
}
/* finally, close the file and return (but don't free fname!) */
- (void) fclose(fp);
+ fclose(fp);
TRACE1(tet_Tscen, 4, "includefile(): return");
}
@@ -1188,7 +1188,7 @@ static char *getline_tcc()
** if there is one
*/
if ((lcp = lcpop()) != (struct lcache *) 0) {
- (void) strcpy(buf, lcp->lc_line);
+ strcpy(buf, lcp->lc_line);
lcfree(lcp);
TRACE2(tet_Tscen, 10, "getline_tcc(): line = <%s>", firstpart(buf));
return(buf);
@@ -1224,7 +1224,7 @@ static char *getline_tcc()
"getline_tcc(): encountered EOF on %s",
ifstp->if_fname);
if (ifstp->if_next) {
- (void) fclose(ifstp->if_fp);
+ fclose(ifstp->if_fp);
ifsfree(ifspop());
continue;
}
@@ -1525,7 +1525,7 @@ char *s;
static char dots[] = " ...";
static char buf[PLEN + sizeof dots];
- (void) sprintf(buf, "%.*s%s", PLEN, s,
+ sprintf(buf, "%.*s%s", PLEN, s,
(int) strlen(s) > PLEN ? dots : "");
return(buf);
diff --git a/src/tet3/tcc/scen2.c b/src/tet3/tcc/scen2.c
index 10645441..09150cca 100644
--- a/src/tet3/tcc/scen2.c
+++ b/src/tet3/tcc/scen2.c
@@ -270,7 +270,7 @@ int proc2sclist()
continue;
TRACE3(tet_Tscen, 4, "tloop check loop TOP: descend tree below scenario %s at %s",
ep->sc_scenario, tet_i2x(ep));
- (void) check_timed_loops(ep->sc_child);
+ check_timed_loops(ep->sc_child);
}
if (scenerrors)
return(0);
@@ -517,7 +517,7 @@ char *fname;
static char fmt[] = "found unmatched %.20s directive";
char msg[sizeof fmt + 20];
- (void) sprintf(msg, fmt, prscdir(directive));
+ sprintf(msg, fmt, prscdir(directive));
scenerror(msg, (char *) 0, lineno, fname);
}
@@ -1109,7 +1109,7 @@ register struct scentab *ep1;
s1 = prsctype(ep1->sc_type);
s2 = "element";
}
- (void) sprintf(msg, fmt, s1, s2);
+ sprintf(msg, fmt, s1, s2);
TRACESCELEM(tet_Tscen, 6, ep1, msg);
#endif
@@ -1294,7 +1294,7 @@ struct scentab **sctp;
if (edp >= dp->dt_enc + dp->dt_nenc) {
scenermsg(prscdir(q->sc_directive), "directive",
q->sc_lineno, q->sc_fname);
- (void) sprintf(msg, fmt, prscdir(ep->sc_directive));
+ sprintf(msg, fmt, prscdir(ep->sc_directive));
scenerror(msg, "directive", ep->sc_lineno,
ep->sc_fname);
}
@@ -1308,7 +1308,7 @@ struct scentab **sctp;
void check_empty_timed_loops()
{
- (void) check_timed_loops(sctree->sc_child);
+ check_timed_loops(sctree->sc_child);
if (scenerrors)
scengiveup();
}
diff --git a/src/tet3/tcc/scenario.c b/src/tet3/tcc/scenario.c
index 80dab87a..d5286f76 100644
--- a/src/tet3/tcc/scenario.c
+++ b/src/tet3/tcc/scenario.c
@@ -155,7 +155,7 @@ char *scenario, *sopt, *cwd;
else {
if (proc1scfile(fp, scenario_file) < 0)
tcc_exit(1);
- (void) fclose(fp);
+ fclose(fp);
}
if (scenerrors)
scengiveup();
diff --git a/src/tet3/tcc/scenpp.c b/src/tet3/tcc/scenpp.c
index e98f2727..8cd67813 100644
--- a/src/tet3/tcc/scenpp.c
+++ b/src/tet3/tcc/scenpp.c
@@ -205,7 +205,7 @@ char **argv;
error(errno, "can't open", *argv);
else {
rc = proc1scfile(ifp, *argv);
- (void) fclose(ifp);
+ fclose(ifp);
if (rc < 0)
tcc_exit(1);
}
@@ -242,13 +242,13 @@ char **argv;
ASSERT(ep->sc_magic == SC_MAGIC);
ASSERT(ep->sc_type == SC_SCENARIO);
printloc(ep->sc_lineno, ep->sc_fname, 0);
- (void) fprintf(ofp, "scenario%s(\"%s\")\n{\n",
+ fprintf(ofp, "scenario%s(\"%s\")\n{\n",
printaddr(ep), ep->sc_scenario);
lastlineno += 2;
printsctree(ep->sc_child, 1);
- (void) fprintf(ofp, "}\n\n");
+ fprintf(ofp, "}\n\n");
lastlineno += 2;
- (void) fflush(ofp);
+ fflush(ofp);
}
tcc_exit(0);
@@ -274,7 +274,7 @@ static void badusage()
char msg[1024];
register char *p = msg;
- (void) sprintf(p, "\t%s", tet_progname);
+ sprintf(p, "\t%s", tet_progname);
len = strlen(p);
p += len;
pos = len + 7;
@@ -286,7 +286,7 @@ static void badusage()
}
else
sep = " ";
- (void) sprintf(p, "%s[%s]", sep, options[n]);
+ sprintf(p, "%s[%s]", sep, options[n]);
len = strlen(p);
p += len;
pos += len;
@@ -307,19 +307,19 @@ int indent;
break;
case SC_TESTCASE:
printloc(ep->sc_lineno, ep->sc_fname, indent);
- (void) fprintf(ofp,
+ fprintf(ofp,
"testcase%s(\"%s\", \"%s\");\n",
printaddr(ep), ep->sc_tcname,
ep->sc_exiclist ? ep->sc_exiclist : "all");
break;
case SC_SCENINFO:
printloc(ep->sc_lineno, ep->sc_fname, indent);
- (void) fprintf(ofp, "sceninfo%s(%s);\n",
+ fprintf(ofp, "sceninfo%s(%s);\n",
printaddr(ep), ep->sc_sceninfo);
break;
case SC_SCEN_NAME:
printloc(ep->sc_lineno, ep->sc_fname, indent);
- (void) fprintf(ofp, "call%s(\"%s\");\n",
+ fprintf(ofp, "call%s(\"%s\");\n",
printaddr(ep), ep->sc_scen_name);
break;
default:
@@ -376,16 +376,16 @@ int indent;
#endif
case SD_VARIABLE:
doindent(indent);
- (void) fprintf(ofp, "{\n");
+ fprintf(ofp, "{\n");
lastlineno++;
for (vp = ep->sc_vars; vp < ep->sc_vars + ep->sc_nvars; vp++) {
printloc(ep->sc_lineno, ep->sc_fname, indent + 1);
- (void) fprintf(ofp, "variable%s %s\n",
+ fprintf(ofp, "variable%s %s\n",
printaddr(ep), *vp);
}
printsctree(ep->sc_child, indent + 1);
doindent(indent);
- (void) fprintf(ofp, "}\n");
+ fprintf(ofp, "}\n");
lastlineno++;
return;
default:
@@ -396,27 +396,27 @@ int indent;
}
printloc(ep->sc_lineno, ep->sc_fname, indent);
- (void) fprintf(ofp, "%s%s(", func, printaddr(ep));
+ fprintf(ofp, "%s%s(", func, printaddr(ep));
switch (ep->sc_directive) {
case SD_TIMED_LOOP:
- (void) fprintf(ofp, "%ld", ep->sc_seconds);
+ fprintf(ofp, "%ld", ep->sc_seconds);
break;
default:
for (ap = argv; ap < argv + argc; ap++) {
if (ap > argv)
- (void) fprintf(ofp, ", ");
- (void) fprintf(ofp, "%d", *ap);
+ fprintf(ofp, ", ");
+ fprintf(ofp, "%d", *ap);
}
break;
}
- (void) fprintf(ofp, ")\n");
+ fprintf(ofp, ")\n");
doindent(indent);
- (void) fprintf(ofp, "{\n");
+ fprintf(ofp, "{\n");
lastlineno++;
printsctree(ep->sc_child, indent + 1);
doindent(indent);
- (void) fprintf(ofp, "}\n");
+ fprintf(ofp, "}\n");
lastlineno++;
}
@@ -437,7 +437,7 @@ char *thisfname;
doit = 1;
}
if (doit)
- (void) fprintf(ofp, "# %d \"%s\"\n",
+ fprintf(ofp, "# %d \"%s\"\n",
thislineno, thisfname);
}
@@ -450,10 +450,10 @@ int indent;
register int space;
for (space = indent * tabwidth; space > 7; space -= 8)
- (void) putc('\t', ofp);
+ putc('\t', ofp);
while (space-- > 0)
- (void) putc(' ', ofp);
+ putc(' ', ofp);
}
static char *printaddr(ep)
@@ -465,13 +465,13 @@ struct scentab *ep;
buf[0] = '\0';
if (printscrefs) {
- (void) sprintf(p, "-%ld", ep->sc_ref);
+ sprintf(p, "-%ld", ep->sc_ref);
p += strlen(p);
}
#ifndef NOTRACE
if (tet_Tscen) {
- (void) sprintf(p, "@%#lx", (long) ep);
+ sprintf(p, "@%#lx", (long) ep);
p += strlen(p);
}
#endif
diff --git a/src/tet3/tcc/scentab.c b/src/tet3/tcc/scentab.c
index b5b5de02..135b7d65 100644
--- a/src/tet3/tcc/scentab.c
+++ b/src/tet3/tcc/scentab.c
@@ -412,7 +412,7 @@ int type;
case SC_SCEN_NAME:
return("REFERENCED SCENARIO NAME");
default:
- (void) sprintf(msg, fmt, type);
+ sprintf(msg, fmt, type);
return(msg);
}
}
@@ -459,7 +459,7 @@ int directive;
if (dp && dp->dt_name)
return(dp->dt_name);
else {
- (void) sprintf(msg, fmt, directive);
+ sprintf(msg, fmt, directive);
return(msg);
}
}
diff --git a/src/tet3/tcc/sigtrap.c b/src/tet3/tcc/sigtrap.c
index 552eef10..a6ba1aa6 100644
--- a/src/tet3/tcc/sigtrap.c
+++ b/src/tet3/tcc/sigtrap.c
@@ -106,7 +106,7 @@ int sig;
if (jnl_usable())
- (void) fprintf(stderr, "%s %d\n", text, sig);
+ fprintf(stderr, "%s %d\n", text, sig);
fatal(0, text, tet_i2a(sig));
}
@@ -118,10 +118,10 @@ int sig;
void execsigtrap()
{
exec_block_signals();
- (void) install_handler(SIGHUP, engine_sigterm);
- (void) install_handler(SIGQUIT, engine_abort);
- (void) install_handler(SIGPIPE, engine_sigterm);
- (void) install_handler(SIGTERM, engine_sigterm);
+ install_handler(SIGHUP, engine_sigterm);
+ install_handler(SIGQUIT, engine_abort);
+ install_handler(SIGPIPE, engine_sigterm);
+ install_handler(SIGTERM, engine_sigterm);
}
/*
@@ -151,11 +151,11 @@ int how;
{
sigset_t mask;
- (void) sigemptyset(&mask);
- (void) sigaddset(&mask, SIGHUP);
- (void) sigaddset(&mask, SIGQUIT);
- (void) sigaddset(&mask, SIGPIPE);
- (void) sigaddset(&mask, SIGTERM);
+ sigemptyset(&mask);
+ sigaddset(&mask, SIGHUP);
+ sigaddset(&mask, SIGQUIT);
+ sigaddset(&mask, SIGPIPE);
+ sigaddset(&mask, SIGTERM);
if (sigprocmask(how, &mask, (sigset_t *) 0) < 0)
fatal(errno, "sigprocmask() failed: how =", tet_i2a(how));
@@ -191,8 +191,8 @@ int sig;
register struct proctab *prp;
- (void) fprintf(stderr, "TCC: user abort called\n");
- (void) fflush(stderr);
+ fprintf(stderr, "TCC: user abort called\n");
+ fflush(stderr);
/*
** this flag tells the execution engine not to start processing
@@ -212,7 +212,7 @@ int sig;
** test cases have terminated and any save files and journal
** processing has completed
*/
- (void) engine_tcinterrupt(sig);
+ engine_tcinterrupt(sig);
}
@@ -247,7 +247,7 @@ int sig;
prp->pr_modes |= TCC_ABORT;
if (prp->pr_state == PRS_WAIT) {
count++;
- (void) RUN_PROCTABS(prp, eng1_tcinterrupt);
+ RUN_PROCTABS(prp, eng1_tcinterrupt);
prp->pr_flags |= PRF_ATTENTION;
}
}
@@ -316,7 +316,7 @@ void engine_shutdown()
for (prp = runq; prp; prp = prp->pr_rqforw)
if (prp->pr_scen->sc_type == SC_TESTCASE) {
count++;
- (void) RUN_PROCTABS(prp, quick_killtc);
+ RUN_PROCTABS(prp, quick_killtc);
}
/* give the tools a chance to terminate */
@@ -355,7 +355,7 @@ struct proctab *prp;
tet_i2x(prp), prtoolstate(prp->pr_toolstate));
if (prp->pr_toolstate == PTS_RUNNING) {
- (void) tcc_kill(*prp->pr_sys, prp->pr_remid, SIGTERM);
+ tcc_kill(*prp->pr_sys, prp->pr_remid, SIGTERM);
prp->pr_toolstate = PTS_EXITED;
}
@@ -381,7 +381,7 @@ void (*func) PROTOLIST((int));
if ((rc = sa.sa_handler) != SIG_IGN) {
sa.sa_handler = func;
sa.sa_flags = 0;
- (void) sigemptyset(&sa.sa_mask);
+ sigemptyset(&sa.sa_mask);
if (sigaction(sig, &sa, (struct sigaction *) 0) < 0)
fatal(errno, "can't install handler for signal",
tet_i2a(sig));
@@ -422,14 +422,14 @@ void (*func) PROTOLIST((int));
/* ignore the signal */
sa.sa_handler = SIG_IGN;
sa.sa_flags = 0;
- (void) sigemptyset(&sa.sa_mask);
+ sigemptyset(&sa.sa_mask);
if (sigaction(sig, &sa, (struct sigaction *) 0) < 0)
fatal(errno, "sigaction(SIG_IGN) failed for signal",
tet_i2a(sig));
/* unblock the signal */
- (void) sigemptyset(&sa.sa_mask);
- (void) sigaddset(&sa.sa_mask, sig);
+ sigemptyset(&sa.sa_mask);
+ sigaddset(&sa.sa_mask, sig);
if (sigprocmask(SIG_UNBLOCK, &sa.sa_mask, (sigset_t *) 0) < 0)
fatal(errno, "sigprocmask(SIG_UNBLOCK) failed for signal",
tet_i2a(sig));
@@ -438,7 +438,7 @@ void (*func) PROTOLIST((int));
if (func != SIG_IGN) {
sa.sa_handler = func;
sa.sa_flags = 0;
- (void) sigemptyset(&sa.sa_mask);
+ sigemptyset(&sa.sa_mask);
if (sigaction(sig, &sa, (struct sigaction *) 0) < 0)
fatal(errno, "sigaction() failed for signal",
tet_i2a(sig));
diff --git a/src/tet3/tcc/tcc.c b/src/tet3/tcc/tcc.c
index bdd05986..ec1b8693 100644
--- a/src/tet3/tcc/tcc.c
+++ b/src/tet3/tcc/tcc.c
@@ -240,7 +240,7 @@ char **argv;
if (*optarg)
nostr(optarg, YN_CMDLINE);
else {
- (void) fprintf(stderr,
+ fprintf(stderr,
"%s: no-string may not be empty\n",
tet_progname);
errors++;
@@ -259,7 +259,7 @@ char **argv;
case 't': /* timeout for test case processing and
lock acqusition */
if ((tcc_timeout = atoi(optarg)) <= 0) {
- (void) fprintf(stderr,
+ fprintf(stderr,
"%s: timeout must be +ve\n", tet_progname);
errors++;
}
@@ -275,7 +275,7 @@ char **argv;
if (*optarg)
yesstr(optarg, YN_CMDLINE);
else {
- (void) fprintf(stderr,
+ fprintf(stderr,
"%s: yes-string may not be empty\n",
tet_progname);
errors++;
@@ -299,7 +299,7 @@ char **argv;
*/
TRACE2(tet_Ttcc, 1, "tcc_modes = %s", prtccmode(tcc_modes));
if ((tcc_modes & (TCC_BUILD | TCC_EXEC | TCC_CLEAN)) == 0) {
- (void) fprintf(stderr,
+ fprintf(stderr,
"%s: at least one of -b, -c, -e and -V must be specified\n",
tet_progname);
errors++;
@@ -307,7 +307,7 @@ char **argv;
/* ensure that only one of rerun and resume mode has been specified */
if ((tcc_modes & TCC_RERUN) && (tcc_modes & TCC_RESUME)) {
- (void) fprintf(stderr,
+ fprintf(stderr,
"%s: only one of -m and -r may be specified\n",
tet_progname);
errors++;
@@ -323,7 +323,7 @@ char **argv;
codelist, old_journal_file);
}
else {
- (void) fprintf(stderr,
+ fprintf(stderr,
"%s: need an old journal file name when -m or -r is specified\n",
tet_progname);
errors++;
@@ -352,7 +352,7 @@ char **argv;
tet_tsname = cwd + strlen(tet_suite_root);
while (isdirsep(*tet_tsname))
tet_tsname++;
- (void) sprintf(fname, "%.*s",
+ sprintf(fname, "%.*s",
(int) sizeof fname - 1, tet_tsname);
for (p = fname; *p; p++)
if (isdirsep(*p)) {
@@ -502,7 +502,7 @@ char **argv;
jnl_init(jopt, cwd);
if (jnl_jfname())
printf("%s: journal file is %s\n", tet_progname, jnl_jfname());
- (void) fflush(stdout);
+ fflush(stdout);
jnl_tcc_start(argcsave, argvsave);
jnl_uname();
@@ -557,7 +557,7 @@ static void badusage()
options[0] = tet_progname;
- (void) fprintf(stderr, "\nusage:\t");
+ fprintf(stderr, "\nusage:\t");
pos = 8;
for (n = 0; n < sizeof options / sizeof options[0]; n++) {
if ((opt = options[n]) == (char *) 0)
@@ -568,10 +568,10 @@ static void badusage()
}
else
sep = n ? " " : "";
- (void) fprintf(stderr, "%s%s", sep, opt);
+ fprintf(stderr, "%s%s", sep, opt);
pos += strlen(opt) + 1;
}
- (void) fprintf(stderr, "\n\nor:\t");
+ fprintf(stderr, "\n\nor:\t");
pos = 8;
for (n = 0; n < sizeof options / sizeof options[0]; n++) {
if ((opt = options[n]) == (char *) 0)
@@ -589,10 +589,10 @@ static void badusage()
}
else
sep = n ? " " : "";
- (void) fprintf(stderr, "%s%s", sep, opt);
+ fprintf(stderr, "%s%s", sep, opt);
pos += strlen(opt) + 1;
}
- (void) fprintf(stderr, "\n\nor:\ttcc -V\n\n");
+ fprintf(stderr, "\n\nor:\ttcc -V\n\n");
tcc_exit(2);
/* NOTREACHED */
@@ -607,7 +607,7 @@ static void prversioninfo()
static char product_name[] =
"TET3";
- (void) fprintf(stderr, "%s: %s%s Release %s\n",
+ fprintf(stderr, "%s: %s%s Release %s\n",
tet_progname,
#ifdef TET_LITE /* -LITE-CUT-LINE */
product_name, "-Lite",
diff --git a/src/tet3/tcc/tcc_in.c b/src/tet3/tcc/tcc_in.c
index 2b2bc4dc..7043aa15 100644
--- a/src/tet3/tcc/tcc_in.c
+++ b/src/tet3/tcc/tcc_in.c
@@ -133,7 +133,7 @@ char **argv;
}
rc = ts_ss2(pp, argv, sd);
- (void) SOCKET_CLOSE(sd);
+ SOCKET_CLOSE(sd);
return(rc);
}
@@ -185,7 +185,7 @@ SOCKET sd;
** the value of the listen socket's handle is passed to the daemon
** using the -l command-line option
*/
- (void) sprintf(path, "%.*s/bin/%s",
+ sprintf(path, "%.*s/bin/%s",
(int) sizeof path - (int) strlen(*argv) - 6,
tet_root, *argv);
@@ -211,15 +211,15 @@ SOCKET sd;
** dup the socket on to fd 0 and close all other files
** except 1 and 2
*/
- (void) close(0);
+ close(0);
if ((rc = fcntl(sd, F_DUPFD, 0)) != 0) {
error(errno, "server socket: fcntl(F_DUPFD) returned",
tet_i2a(rc));
_exit(~0);
}
for (fd = tet_getdtablesize() - 1; fd > 2; fd--)
- (void) close(fd);
- (void) execv(path, argv);
+ close(fd);
+ execv(path, argv);
error(errno, "can't exec", path);
_exit(~0);
}
diff --git a/src/tet3/tcc/tcc_xt.c b/src/tet3/tcc/tcc_xt.c
index 152b23db..e34d26e8 100644
--- a/src/tet3/tcc/tcc_xt.c
+++ b/src/tet3/tcc/tcc_xt.c
@@ -195,7 +195,7 @@ char **argv;
rc = ts_ss3(pp, argv, fd);
- (void) t_close(fd);
+ t_close(fd);
return(rc);
}
@@ -237,7 +237,7 @@ int fd;
if ((ret = T_ALLOC_BIND(fd)) == (struct t_bind *)0) {
xt_error(t_errno, "can't allocate T_BIND", (char *) 0);
- (void) t_close(fd);
+ t_close(fd);
return(-1);
}
TRACE2(tet_Tbuf, 6, "t_alloc() = %s", tet_i2x(ret));
@@ -246,8 +246,8 @@ int fd;
xt_error(t_errno, "can't bind to server fd", (char *)0);
TRACE2(tet_Tbuf, 6, "t_free ret = %s", tet_i2x(ret));
- (void) t_free((char *)ret, T_BIND);
- (void) t_close(fd);
+ t_free((char *)ret, T_BIND);
+ t_close(fd);
return (-1);
}
@@ -255,8 +255,8 @@ int fd;
if (ret->addr.len == 0) {
xt_error(t_errno, "address not generated", (char *)0);
TRACE2(tet_Tbuf, 6, "t_free ret = %s", tet_i2x(ret));
- (void) t_free((char *)ret, T_BIND);
- (void) t_close(fd);
+ t_free((char *)ret, T_BIND);
+ t_close(fd);
return (-1);
}
@@ -284,7 +284,7 @@ int fd;
}
else if (pid == 0) {
/* in child */
- (void) sprintf(path, "%.*s/bin/%s",
+ sprintf(path, "%.*s/bin/%s",
(int) sizeof path - (int) strlen(*argv) - 6,
tet_root, *argv);
#ifndef NOTRACE
@@ -296,9 +296,9 @@ int fd;
#endif
/* dup the connection on to fd 0 and close all other
files except 1 and 2 */
- (void) close(0);
+ close(0);
TRACE2(tet_Tbuf, 6, "t_free ret = %s", tet_i2x(ret));
- (void) t_free((char *)ret, T_BIND);
+ t_free((char *)ret, T_BIND);
if ((rc = fcntl(fd, F_DUPFD, 0)) != 0) {
error(errno, "server socket: fcntl(F_DUPFD) returned",
@@ -306,8 +306,8 @@ int fd;
_exit(~0);
}
for (fd = tet_getdtablesize() - 1; fd > 2; fd--)
- (void) close(fd);
- (void) execv(path, argv);
+ close(fd);
+ execv(path, argv);
error(errno, "can't exec", path);
_exit(~0);
}
@@ -338,18 +338,18 @@ int fd;
if ((tp->tp_call.buf = (char *) malloc(tp->tp_call.maxlen)) == (char *) 0) {
error(errno, "can't malloc server address", (char *)0);
TRACE2(tet_Tbuf, 6, "t_free ret = %s", tet_i2x(ret));
- (void) t_free((char *)ret, T_BIND);
+ t_free((char *)ret, T_BIND);
return (-1);
}
TRACE2(tet_Tbuf, 6, "allocate tp_call.buf = %s",
tet_i2x(tp->tp_call.buf));
- (void) memcpy(tp->tp_call.buf, ret->addr.buf, ret->addr.len);
+ memcpy(tp->tp_call.buf, ret->addr.buf, ret->addr.len);
if (ret->addr.maxlen > ret->addr.len)
- (void) memset(tp->tp_call.buf + ret->addr.len, '\0',
+ memset(tp->tp_call.buf + ret->addr.len, '\0',
ret->addr.maxlen - ret->addr.len);
- (void) t_free((char *)ret, T_BIND);
+ t_free((char *)ret, T_BIND);
return (0);
}
@@ -441,7 +441,7 @@ register int ptype;
}
mp->ts.osico.ts_len = tp->tp_call.len;
- (void) memcpy(mp->ts.osico.ts_nsap, tp->tp_call.buf,
+ memcpy(mp->ts.osico.ts_nsap, tp->tp_call.buf,
tp->tp_call.len);
break;
diff --git a/src/tet3/tcc/tool.c b/src/tet3/tcc/tool.c
index 23da0f53..58ecba48 100644
--- a/src/tet3/tcc/tool.c
+++ b/src/tet3/tcc/tool.c
@@ -299,7 +299,7 @@ char *s;
*/
ap = *avp + *anp;
if (splitflds && nflds > 1) {
- (void) sprintf(buf, "%.*s", (int) sizeof buf - 1, s);
+ sprintf(buf, "%.*s", (int) sizeof buf - 1, s);
nflds = tet_getargs(buf, ap, nflds);
}
else
@@ -360,7 +360,7 @@ char *tcname, **argv, *ocfname;
case TCS_EXEC:
case TCS_CLEAN:
xresfilename(prp->pr_scen->sc_tcname, buf, sizeof buf);
- (void) tcc_unlink(*prp->pr_sys, buf);
+ tcc_unlink(*prp->pr_sys, buf);
prp->pr_tetxres = rstrstore(buf);
break;
}
@@ -391,7 +391,7 @@ char *tcname, **argv, *ocfname;
/* unlink an existing output capture file if one is specified */
if (ocfname)
- (void) tcc_unlink(*prp->pr_sys, ocfname);
+ tcc_unlink(*prp->pr_sys, ocfname);
/*
** do the exec:
@@ -715,7 +715,7 @@ char *ocfname;
}
if (getremfile(prp, ocfname, tet_basename(tfname)) == 0)
ocf2jnl2(prp, tfname);
- (void) UNLINK(tfname);
+ UNLINK(tfname);
}
else
#endif /* !TET_LITE */ /* -END-LITE-CUT- */
@@ -753,7 +753,7 @@ char *ocfname;
jnl_captured(prp, buf);
}
- (void) fclose(fp);
+ fclose(fp);
}
@@ -784,7 +784,7 @@ char *fromfile, *tofile;
** directory on the local system
*/
if (tet_tcrxfile(*prp->pr_sys, fromfile, tofile) < 0) {
- (void) sprintf(msg, fmt, sizeof msg - sizeof fmt, tofile);
+ sprintf(msg, fmt, sizeof msg - sizeof fmt, tofile);
prperror(prp, *prp->pr_sys, tet_tcerrno, msg, fromfile);
return(-1);
}
diff --git a/src/tet3/tcc/utils.c b/src/tet3/tcc/utils.c
index 906b4f63..d4d4e973 100644
--- a/src/tet3/tcc/utils.c
+++ b/src/tet3/tcc/utils.c
@@ -157,11 +157,11 @@ void scenermsg(s1, s2, lineno, fname)
char *s1, *s2, *fname;
int lineno;
{
- (void) fprintf(stderr, "%s: %s", tet_progname, s1);
+ fprintf(stderr, "%s: %s", tet_progname, s1);
if (s2 && *s2)
- (void) fprintf(stderr, " %s", s2);
- (void) fprintf(stderr, " at line %d in file %s\n", lineno, fname);
- (void) fflush(stderr);
+ fprintf(stderr, " %s", s2);
+ fprintf(stderr, " at line %d in file %s\n", lineno, fname);
+ fflush(stderr);
}
/*
@@ -170,7 +170,7 @@ int lineno;
void scengiveup()
{
- (void) fprintf(stderr,
+ fprintf(stderr,
"%s: giving up after finding %d scenario error%s\n",
tet_progname, scenerrors, scenerrors == 1 ? "" : "s");
tcc_exit(1);
@@ -196,7 +196,7 @@ int dirlen;
len = 1;
}
- (void) sprintf(dir, "%.*s", TET_MIN(len, dirlen - 1), path);
+ sprintf(dir, "%.*s", TET_MIN(len, dirlen - 1), path);
}
/*
@@ -240,7 +240,7 @@ void fullpath(const char *dir, const char *file, char path[], int pathlen, int r
ASSERT(isabspathrem(dir));
else
ASSERT(isabspathloc(dir));
- (void) sprintf(p, "%.*s", pathlen - 2, dir);
+ sprintf(p, "%.*s", pathlen - 2, dir);
len = strlen(p);
p += len;
pathlen -= len;
@@ -255,7 +255,7 @@ void fullpath(const char *dir, const char *file, char path[], int pathlen, int r
}
- (void) sprintf(p, "%.*s", pathlen - 1, file);
+ sprintf(p, "%.*s", pathlen - 1, file);
if ((dir ? (int) strlen(dir) : 0) + (int) strlen(file) > pathlen - 2)
error(0, "path name is too long and has been truncated:",
diff --git a/src/tet3/tccd/config.c b/src/tet3/tccd/config.c
index 0e749059..f83a400b 100644
--- a/src/tet3/tccd/config.c
+++ b/src/tet3/tccd/config.c
@@ -265,7 +265,7 @@ register struct ptab *pp;
rc = ER_ERR;
}
- (void) fclose(fp);
+ fclose(fp);
cflags = (cflags & ~CF_SINPROGRESS) | CF_SDONE;
pp->ptm_rc = rc;
}
@@ -413,7 +413,7 @@ int mode;
if ((rc = op_c3(fname)) == ER_OK) {
if (tet_config[mode]) {
- (void) UNLINK(tet_config[mode]);
+ UNLINK(tet_config[mode]);
TRACE3(tet_Tbuf, 6, "free tet_config[%s] = %s",
tet_i2a(mode), tet_i2x(tet_config[mode]));
free(tet_config[mode]);
@@ -457,7 +457,7 @@ char *fname;
/* remove the file if any of the above failed */
if (rc != ER_OK)
- (void) UNLINK(fname);
+ UNLINK(fname);
return(rc);
}
@@ -797,7 +797,7 @@ register struct ptab *pp;
pp->ptm_rc = ER_ERR;
return;
}
- (void) sprintf(var, "%s=%s", envname, tet_config[mode]);
+ sprintf(var, "%s=%s", envname, tet_config[mode]);
if (tet_putenv(var) < 0) {
pp->ptm_rc = ER_ERR;
return;
@@ -818,6 +818,6 @@ void config_cleanup()
for (n = 0; n < sizeof tet_config / sizeof tet_config[0]; n++)
if (tet_config[n])
- (void) UNLINK(tet_config[n]);
+ UNLINK(tet_config[n]);
}
diff --git a/src/tet3/tccd/etab.c b/src/tet3/tccd/etab.c
index 0fd67b43..83f76a9f 100644
--- a/src/tet3/tccd/etab.c
+++ b/src/tet3/tccd/etab.c
@@ -147,7 +147,7 @@ struct ptab *pp;
for (ep = etab; ep; ep = ep->et_next)
if (ep->et_ptab == pp) {
if (ep->et_state == ES_RUNNING)
- (void) KILL(ep->et_pid, SIGHUP);
+ KILL(ep->et_pid, SIGHUP);
etrm(ep);
etfree(ep);
done = 0;
diff --git a/src/tet3/tccd/exec.c b/src/tet3/tccd/exec.c
index 294bd11e..73a34ac7 100644
--- a/src/tet3/tccd/exec.c
+++ b/src/tet3/tccd/exec.c
@@ -268,12 +268,12 @@ struct etab *ep;
void tcc_exec_signals()
{
- (void) signal(SIGHUP, SIG_DFL);
- (void) signal(SIGINT, SIG_DFL);
- (void) signal(SIGQUIT, SIG_DFL);
- (void) signal(SIGTSTP, SIG_DFL);
- (void) signal(SIGTTIN, SIG_DFL);
- (void) signal(SIGTTOU, SIG_DFL);
+ signal(SIGHUP, SIG_DFL);
+ signal(SIGINT, SIG_DFL);
+ signal(SIGQUIT, SIG_DFL);
+ signal(SIGTSTP, SIG_DFL);
+ signal(SIGTTIN, SIG_DFL);
+ signal(SIGTTOU, SIG_DFL);
}
@@ -529,8 +529,8 @@ register int timeout;
else
alarm_save = 2;
}
- (void) alarm(alarm_save);
- (void) signal(SIGALRM, (SIG_FUNC_T (*)()) sig_save);
+ alarm(alarm_save);
+ signal(SIGALRM, (SIG_FUNC_T (*)()) sig_save);
}
return(rc);
@@ -558,11 +558,11 @@ time_t start;
for (;;) {
status = 0;
if (timeout > 0)
- (void) alarm((unsigned) TET_MAX(tleft, 2));
+ alarm((unsigned) TET_MAX(tleft, 2));
rc = tet_dowait3(&status, timeout ? 0 : WNOHANG);
save_errno = errno;
if (timeout > 0)
- (void) alarm(0);
+ alarm(0);
TRACE4(tet_Ttccd, 4,
"wait3 returned pid = %s, status = %s, signal %s",
tet_i2a(rc), tet_i2a((status >> 8) & 0xff),
@@ -605,7 +605,7 @@ time_t start;
static SIG_FUNC_T catchalarm(sig)
int sig;
{
- (void) signal(SIGALRM, SIG_IGN);
+ signal(SIGALRM, SIG_IGN);
wait_timedout = 1;
longjmp(wait_env, 1);
}
diff --git a/src/tet3/tccd/log.c b/src/tet3/tccd/log.c
index 7fd6b472..2598b38e 100644
--- a/src/tet3/tccd/log.c
+++ b/src/tet3/tccd/log.c
@@ -96,7 +96,7 @@ void loginit()
fatal(errno, "can't open log file", Logfile);
/* allow anyone to read/write to the logfile */
- (void) CHMOD(Logfile, (mode_t)S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH);
+ CHMOD(Logfile, (mode_t)S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH);
/* attach stderr to the logfile */
errno = 0;
@@ -105,7 +105,7 @@ void loginit()
fatal(errno, "can't reopen stderr as", Logfile);
}
- (void) fclose(fp);
+ fclose(fp);
setbuf(lfp, buf);
@@ -124,11 +124,11 @@ char *s1, *s2;
fp = getlogfp();
- (void) fprintf(fp, "%s: %s", loghdr(), s1);
+ fprintf(fp, "%s: %s", loghdr(), s1);
if (s2 && *s2)
- (void) fprintf(fp, " %s", s2);
- (void) putc('\n', fp);
- (void) fflush(fp);
+ fprintf(fp, " %s", s2);
+ putc('\n', fp);
+ fflush(fp);
}
/*
@@ -155,7 +155,7 @@ static char *loghdr()
t = time((time_t *) 0);
tp = localtime(&t);
- (void) sprintf(header, "%.16s (%d) %d %s %d:%02d:%02d",
+ sprintf(header, "%.16s (%d) %d %s %d:%02d:%02d",
tet_progname, tet_mypid, tp->tm_mday, month[tp->tm_mon],
tp->tm_hour, tp->tm_min, tp->tm_sec);
diff --git a/src/tet3/tccd/log.c.orig b/src/tet3/tccd/log.c.orig
index dd640439..8a245290 100644
--- a/src/tet3/tccd/log.c.orig
+++ b/src/tet3/tccd/log.c.orig
@@ -89,7 +89,7 @@ void loginit()
fatal(errno, "can't open log file", Logfile);
/* allow anyone to read/write to the logfile */
- (void) CHMOD(Logfile, (mode_t)S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH);
+ CHMOD(Logfile, (mode_t)S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH);
/* attach stderr to the logfile */
errno = 0;
@@ -98,7 +98,7 @@ void loginit()
fatal(errno, "can't reopen stderr as", Logfile);
}
- (void) fclose(fp);
+ fclose(fp);
setbuf(lfp, buf);
@@ -117,11 +117,11 @@ char *s1, *s2;
fp = getlogfp();
- (void) fprintf(fp, "%s: %s", loghdr(), s1);
+ fprintf(fp, "%s: %s", loghdr(), s1);
if (s2 && *s2)
- (void) fprintf(fp, " %s", s2);
- (void) putc('\n', fp);
- (void) fflush(fp);
+ fprintf(fp, " %s", s2);
+ putc('\n', fp);
+ fflush(fp);
}
/*
@@ -150,7 +150,7 @@ static char *loghdr()
t = time((time_t *) 0);
tp = localtime(&t);
- (void) sprintf(header, "%.16s (%d) %d %s %d:%02d:%02d",
+ sprintf(header, "%.16s (%d) %d %s %d:%02d:%02d",
tet_progname, tet_mypid, tp->tm_mday, month[tp->tm_mon],
tp->tm_hour, tp->tm_min, tp->tm_sec);
diff --git a/src/tet3/tccd/stcc.c b/src/tet3/tccd/stcc.c
index a3b91f88..3a58c1dd 100644
--- a/src/tet3/tccd/stcc.c
+++ b/src/tet3/tccd/stcc.c
@@ -126,7 +126,7 @@ struct ptab *pp;
for (n = 0; n < OP_PUTENV_NLINE(mp); n++) {
p1 = tet_equindex(AV_ENVAR(mp, n));
ASSERT(p1);
- (void) sprintf(buf, "%.*s",
+ sprintf(buf, "%.*s",
TET_MIN((int) (p1 - AV_ENVAR(mp, n)), (int) sizeof buf - 1),
AV_ENVAR(mp, n));
if (!strcmp(buf, "TET_ROOT") && tetrootset(p1 + 1) < 0)
diff --git a/src/tet3/tccd/tccd.c b/src/tet3/tccd/tccd.c
index 35c4179c..df1d5ba4 100644
--- a/src/tet3/tccd/tccd.c
+++ b/src/tet3/tccd/tccd.c
@@ -129,9 +129,9 @@ int argc;
char **argv;
{
/* ignore certain signals */
- (void) signal(SIGHUP, SIG_IGN);
- (void) signal(SIGINT, SIG_IGN);
- (void) signal(SIGQUIT, SIG_IGN);
+ signal(SIGHUP, SIG_IGN);
+ signal(SIGINT, SIG_IGN);
+ signal(SIGQUIT, SIG_IGN);
/* initialise the global variables for the library code */
tet_init_globals("tccd", PT_STCC, -1, logerror, tet_genfatal);
@@ -141,12 +141,12 @@ char **argv;
tet_init_blockable_sigs();
/* open the error log file */
- (void) umask((mode_t) 022);
+ umask((mode_t) 022);
loginit();
/* catch SIGTERM */
if (signal(SIGTERM, SIG_IGN) != SIG_IGN)
- (void) signal(SIGTERM, terminate);
+ signal(SIGTERM, terminate);
/* call the generic server */
return(tet_si_main(argc, argv, 0));
@@ -184,7 +184,7 @@ char *firstarg, *nextarg;
mask = 0;
while (*p >= '0' && *p <= '7')
mask = (mask << 3) | (*p++ & 07);
- (void) umask((mode_t)(mask & 077));
+ umask((mode_t)(mask & 077));
break;
case 'l':
if (*(firstarg + 2))
@@ -266,7 +266,7 @@ void tet_ss_initdaemon()
/* fix up HOME environment variable if necessary */
if ((p = getenv(home)) == (char *) 0 || strcmp(p, pw->pw_dir)) {
- (void) sprintf(buf, "%s=%.*s", home,
+ sprintf(buf, "%s=%.*s", home,
(int) sizeof buf - (int) sizeof home - 2, pw->pw_dir);
if ((p = tet_strstore(buf)) == (char *) 0 || tet_putenv(p) < 0)
exit(1);
@@ -274,7 +274,7 @@ void tet_ss_initdaemon()
/* provide a default PATH variable if necessary */
if ((p = getenv(path)) == (char *) 0) {
- (void) sprintf(buf, "%s=%.*s", path,
+ sprintf(buf, "%s=%.*s", path,
(int) sizeof buf - (int) sizeof path - 2, defpath);
TRACE2(tet_Ttccd, 4, "no PATH env var, using default: \"%s\"",
buf);
@@ -296,11 +296,11 @@ void tet_ss_initdaemon()
/* attach stdin to /dev/null and stdout to stderr (which goes
to the log file */
- (void) CLOSE(0);
+ CLOSE(0);
errno = 0;
if (OPEN(null, O_RDONLY, 0) != 0)
fatal(errno, "can't open", null);
- (void) CLOSE(1);
+ CLOSE(1);
errno = 0;
if (FCNTL_F_DUPFD(FILENO(stderr), 1) != 1)
fatal(errno, "can't attach stdout to stderr", (char *) 0);
@@ -351,7 +351,7 @@ register struct ptab *pp;
/* emit a diagnostic message if this is unexpected */
if ((pp->pt_flags & PF_LOGGEDOFF) == 0) {
- (void) sprintf(msg, fmt, (pp->pt_flags & PF_SERVER) ? se : cl);
+ sprintf(msg, fmt, (pp->pt_flags & PF_SERVER) ? se : cl);
error(0, msg, tet_r2a(&pp->pt_rid));
}
@@ -640,7 +640,7 @@ struct ptab *pp;
void tet_ss_cleanup()
{
config_cleanup();
- (void) tet_xdlogoff();
+ tet_xdlogoff();
tet_ts_cleanup();
exit(0);
}
@@ -689,7 +689,7 @@ int sig;
int tetrootset(s)
char *s;
{
- (void) sprintf(tet_root, "%.*s", (int) sizeof tet_root - 1, s);
+ sprintf(tet_root, "%.*s", (int) sizeof tet_root - 1, s);
return(0);
}
diff --git a/src/tet3/tccd/tccd_in.c b/src/tet3/tccd/tccd_in.c
index 15c820ba..9604dd76 100644
--- a/src/tet3/tccd/tccd_in.c
+++ b/src/tet3/tccd/tccd_in.c
@@ -160,7 +160,7 @@ void ss_tsinitb4fork()
errno = 0;
if ((sd = fcntl(0, F_DUPFD, 3)) < 3)
fatal(errno, "can't dup stdin socket", (char *) 0);
- (void) close(0);
+ close(0);
/* allocate a ptab entry for the incoming request */
@@ -176,7 +176,7 @@ void ss_tsinitb4fork()
(char *) 0);
/* log the connection */
- (void) tet_ss_tsafteraccept(pp);
+ tet_ss_tsafteraccept(pp);
/* register the ptab entry */
tet_ss_newptab(pp);
@@ -207,7 +207,7 @@ void ss_tsinitb4fork()
errno = 0;
if ((tet_listen_sd = fcntl(sd, F_DUPFD, 3)) < 3)
fatal(errno, "can't dup listen socket", (char *) 0);
- (void) close(sd);
+ close(sd);
}
else
tet_listen_sd = sd;
@@ -222,7 +222,7 @@ void ss_tsinitb4fork()
tet_ts_listen(tet_listen_sd);
/* arrange to reap child daemon processes */
- (void) signal(SIGCHLD, waitchild);
+ signal(SIGCHLD, waitchild);
#endif /* INETD */
}
@@ -327,7 +327,7 @@ struct ptab *pp;
p = hp->h_name;
else
p = inet_ntoa(tp->tp_sin.sin_addr);
- (void) sprintf(rhostname, "%.*s", (int) sizeof rhostname - 1, p);
+ sprintf(rhostname, "%.*s", (int) sizeof rhostname - 1, p);
logent("connection received from", rhostname);
#ifdef INETD
@@ -344,9 +344,9 @@ struct ptab *pp;
else if (!pid) {
/* in child */
tet_mypid = getpid();
- (void) close(tet_listen_sd);
+ close(tet_listen_sd);
tet_listen_sd = INVALID_SOCKET;
- (void) signal(SIGCHLD, SIG_DFL);
+ signal(SIGCHLD, SIG_DFL);
}
else {
/* in parent - return -1 to close the socket and
@@ -376,7 +376,7 @@ int ss_tslogon()
FILE *fp;
ASSERT(tet_root[0]);
- (void) sprintf(fname, "%.*s/%s",
+ sprintf(fname, "%.*s/%s",
(int) sizeof fname - (int) sizeof equiv - 1,
tet_root, equiv);
@@ -401,7 +401,7 @@ int ss_tslogon()
if (rc != ER_OK)
error(0, "refused login request from", rhostname);
- (void) fclose(fp);
+ fclose(fp);
return(rc);
}
@@ -424,7 +424,7 @@ int sig;
register int pid;
#endif
- (void) signal(SIGCHLD, SIG_DFL);
+ signal(SIGCHLD, SIG_DFL);
#ifdef NOTRACE
while (tet_dowait3(&status, WNOHANG) > 0)
@@ -437,7 +437,7 @@ int sig;
tet_i2a(status & 0xff));
#endif
- (void) signal(SIGCHLD, waitchild);
+ signal(SIGCHLD, waitchild);
}
#endif
diff --git a/src/tet3/tccd/tccd_xt.c b/src/tet3/tccd/tccd_xt.c
index 6d2775fa..2be28268 100644
--- a/src/tet3/tccd/tccd_xt.c
+++ b/src/tet3/tccd/tccd_xt.c
@@ -144,9 +144,9 @@ char *firstarg, *nextarg;
/* all ok - copy static data to safer place */
np.maxlen = p->maxlen;
np.len = p->len;
- (void) memcpy(np.buf, p->buf, p->len);
+ memcpy(np.buf, p->buf, p->len);
if (np.maxlen > np.len)
- (void) memset(np.buf + np.len, '\0',
+ memset(np.buf + np.len, '\0',
np.maxlen - np.len);
Tccdaddr = &np;
@@ -203,7 +203,7 @@ void ss_tsinitb4fork()
errno = 0;
if ((tet_listen_fd = fcntl(fd, F_DUPFD, 3)) < 3)
fatal(errno, "can't dup listen fd", (char *) 0);
- (void) close(fd);
+ close(fd);
}
else
tet_listen_fd = fd;
@@ -236,7 +236,7 @@ void ss_tsinitb4fork()
tet_ts_listen(tet_listen_fd);
/* arrange to reap child daemon processes */
- (void) signal(SIGCHLD, waitchild);
+ signal(SIGCHLD, waitchild);
}
/*
@@ -321,9 +321,9 @@ struct ptab *pp;
else if (!pid) {
/* in child */
tet_mypid = getpid();
- (void) close(tet_listen_fd);
+ close(tet_listen_fd);
tet_listen_fd = -1;
- (void) signal(SIGCHLD, SIG_DFL);
+ signal(SIGCHLD, SIG_DFL);
}
else {
/* in parent - return -1 to close the connection and
@@ -362,7 +362,7 @@ int sig;
register int pid;
#endif
- (void) signal(SIGCHLD, SIG_DFL);
+ signal(SIGCHLD, SIG_DFL);
#ifdef NOTRACE
while (tet_dowait3(&status, WNOHANG) > 0)
@@ -375,7 +375,7 @@ int sig;
tet_i2a(status & 0xff));
#endif
- (void) signal(SIGCHLD, waitchild);
+ signal(SIGCHLD, waitchild);
}
@@ -454,7 +454,7 @@ register struct ptab *pp;
}
TRACE2(tet_Tbuf, 6, "allocate TCP tsinfo buffer = %s",
tet_i2x(ap->buf));
- (void) memset((char *) ap->buf, '\0',
+ memset((char *) ap->buf, '\0',
sizeof (struct sockaddr_in));
((struct sockaddr_in *)ap->buf)->sin_family
@@ -488,7 +488,7 @@ register struct ptab *pp;
}
TRACE2(tet_Tbuf, 6, "allocate OSICO tsinfo buffer = %s",
tet_i2x(ap->buf));
- (void) memcpy(ap->buf, mp->ts.osico.ts_nsap, ap->len);
+ memcpy(ap->buf, mp->ts.osico.ts_nsap, ap->len);
TRACE4(tet_Ttccd, 2,
"received tsinfo for %s: len = %s, addr = %s",
diff --git a/src/tet3/tccd/tccdstart.c b/src/tet3/tccd/tccdstart.c
index 75bd6421..b6800cb9 100644
--- a/src/tet3/tccd/tccdstart.c
+++ b/src/tet3/tccd/tccdstart.c
@@ -63,7 +63,7 @@ int main()
char **tp;
for (tp = text; tp < &text[sizeof text / sizeof text[0]]; tp++)
- (void) fprintf(stderr, "%s\n", *tp);
+ fprintf(stderr, "%s\n", *tp);
return(1);
}
diff --git a/src/tet3/tccd/tsfile.c b/src/tet3/tccd/tsfile.c
index a480bb05..306fd850 100644
--- a/src/tet3/tccd/tsfile.c
+++ b/src/tet3/tccd/tsfile.c
@@ -113,7 +113,7 @@ register struct ptab *pp;
AV_DIR(mp), AV_SUFFIX(mp));
/* construct the specified directory path name */
- (void) sprintf(dir, "%.*s", (int) sizeof dir - 1, AV_DIR(mp));
+ sprintf(dir, "%.*s", (int) sizeof dir - 1, AV_DIR(mp));
/* open the directory */
if ((dirp = OPENDIR(dir)) == (DIR *) 0) {
@@ -129,7 +129,7 @@ register struct ptab *pp;
while ((dp = READDIR(dirp)) != (struct dirent *) 0)
if ((n = atoi(dp->d_name)) > nmax)
nmax = n;
- (void) CLOSEDIR(dirp);
+ CLOSEDIR(dirp);
/* make the directory first without the suffix (try a few times) */
for (n = 0; n < 5; n++) {
@@ -141,7 +141,7 @@ register struct ptab *pp;
pp->ptm_len = 0;
return;
}
- (void) sprintf(lokdir, "%s/%04d", dir, nmax);
+ sprintf(lokdir, "%s/%04d", dir, nmax);
TRACE2(tet_Ttccd, 6, "mksdir: try lokdir = \"%s\"", lokdir);
if (tet_mkdir(lokdir, DIRMODE) == 0 || errno != EEXIST)
break;
@@ -156,11 +156,11 @@ register struct ptab *pp;
/* then make the directory with the suffix
and remove the other one */
- (void) sprintf(savdir, "%s%.3s", lokdir, AV_SUFFIX(mp));
+ sprintf(savdir, "%s%.3s", lokdir, AV_SUFFIX(mp));
TRACE2(tet_Ttccd, 6, "mksdir: make savdir = \"%s\"", savdir);
if ((rc = tet_mkdir(savdir, DIRMODE)) < 0)
error(errno, errmsg, savdir);
- (void) tet_rmdir(lokdir);
+ tet_rmdir(lokdir);
if (rc < 0) {
pp->ptm_rc = ER_ERR;
pp->ptm_mtype = MT_NODATA;
@@ -174,7 +174,7 @@ register struct ptab *pp;
free(sfdir);
}
if ((sfdir = tet_strstore(savdir)) == (char *) 0) {
- (void) tet_rmdir(savdir);
+ tet_rmdir(savdir);
pp->ptm_rc = ER_ERR;
pp->ptm_mtype = MT_NODATA;
pp->ptm_len = 0;
@@ -253,7 +253,7 @@ struct ptab *pp;
todir = sfdir;
else {
len = (int) sizeof dir - (int) strlen(sfdir) - 2;
- (void) sprintf(dir, "%.*s/%.*s",
+ sprintf(dir, "%.*s/%.*s",
(int) sizeof dir - 2, sfdir,
TET_MAX(len, 0), AV_SUBDIR(mp));
todir = dir;
diff --git a/src/tet3/tcclib/lockfile.c b/src/tet3/tcclib/lockfile.c
index d5d34c01..dc51926e 100644
--- a/src/tet3/tcclib/lockfile.c
+++ b/src/tet3/tcclib/lockfile.c
@@ -88,7 +88,7 @@ int timeout;
errno = 0;
return(ER_TIMEDOUT);
}
- (void) SLEEP(2);
+ SLEEP(2);
}
/* handle unexpected errors */
@@ -100,7 +100,7 @@ int timeout;
}
/* all ok so close the file and return success */
- (void) CLOSE(fd);
+ CLOSE(fd);
return(ER_OK);
}
diff --git a/src/tet3/tcclib/lsdir.c b/src/tet3/tcclib/lsdir.c
index 86e7fcfe..75d114da 100644
--- a/src/tet3/tcclib/lsdir.c
+++ b/src/tet3/tcclib/lsdir.c
@@ -109,7 +109,7 @@ char *dir;
*++fip = (char *) 0;
nfiles++;
}
- (void) CLOSEDIR(dirp);
+ CLOSEDIR(dirp);
return(files);
}
diff --git a/src/tet3/tcclib/lsdir.c.orig b/src/tet3/tcclib/lsdir.c.orig
index 39a0e8aa..353eb479 100644
--- a/src/tet3/tcclib/lsdir.c.orig
+++ b/src/tet3/tcclib/lsdir.c.orig
@@ -94,7 +94,7 @@ char *dir;
*++fip = (char *) 0;
nfiles++;
}
- (void) CLOSEDIR(dirp);
+ CLOSEDIR(dirp);
return(files);
}
diff --git a/src/tet3/tcclib/mktmpdir.c b/src/tet3/tcclib/mktmpdir.c
index a9858d05..30bb6992 100644
--- a/src/tet3/tcclib/mktmpdir.c
+++ b/src/tet3/tcclib/mktmpdir.c
@@ -90,7 +90,7 @@ char *dir, **subdp;
ASSERT(dir && *dir);
/* format the pid string */
- (void) sprintf(pidstr, "%05u", tet_mypid);
+ sprintf(pidstr, "%05u", tet_mypid);
/* get a buffer for the tmp dir name */
needlen = strlen(dir) + strlen(pidstr) + 4;
@@ -100,7 +100,7 @@ char *dir, **subdp;
/* try to make the directory a few times */
for (salt1 = 'a'; salt1 <= 'z'; salt1++)
for (salt2 = 'a'; salt2 <= 'z'; salt2++) {
- (void) sprintf(subdir, "%s/%s%c%c",
+ sprintf(subdir, "%s/%s%c%c",
dir, pidstr, salt1, salt2);
if ((rc = tcf_mktd2(subdir)) < 0)
return(rc);
diff --git a/src/tet3/tcclib/procdir.c b/src/tet3/tcclib/procdir.c
index 17a2628e..8b052028 100644
--- a/src/tet3/tcclib/procdir.c
+++ b/src/tet3/tcclib/procdir.c
@@ -142,10 +142,10 @@ int flag;
/* construct the path name to this file */
if (!*fromdir || (*fromdir == '.' && !*(fromdir + 1)))
- (void) sprintf(path, "%.*s", (int) sizeof path - 1, fromfile);
+ sprintf(path, "%.*s", (int) sizeof path - 1, fromfile);
else {
len = (int) sizeof path - (int) strlen(fromdir) - 2;
- (void) sprintf(path, "%.*s/%.*s",
+ sprintf(path, "%.*s/%.*s",
(int) sizeof path - 2, fromdir,
TET_MAX(len, 0), fromfile);
}
@@ -227,7 +227,7 @@ int flag;
rc = ER_OK;
len = (int) sizeof path - (int) strlen(fromdir) - 2;
for (fip = fromfiles; *fip; fip++) {
- (void) sprintf(path, "%.*s/%.*s",
+ sprintf(path, "%.*s/%.*s",
(int) sizeof path - 2, fromdir,
TET_MAX(len, 0), *fip);
if (STAT(path, &stbuf) < 0) {
@@ -274,11 +274,11 @@ int flag;
return(ER_ERR);
p = tofile;
if (todir) {
- (void) sprintf(tofile, "%.*s/",
+ sprintf(tofile, "%.*s/",
(int) sizeof tofile - 2, todir);
p += strlen(tofile);
}
- (void) sprintf(p, "%.*s",
+ sprintf(p, "%.*s",
(int) sizeof tofile - (int) (p - tofile) - 1, fromfile);
TRACE3(Ttcclib, 8, "call xd_rxfile: from = \"%s\", to = \"%s\"",
fromfile, tofile);
@@ -311,7 +311,7 @@ char *fromfile, *todir;
/* construct the destination file name */
len = (int) sizeof tofile - (int) strlen(todir) - 2;
- (void) sprintf(tofile, "%.*s/%.*s",
+ sprintf(tofile, "%.*s/%.*s",
(int) sizeof tofile - 2, todir, TET_MAX(len, 0), fromfile);
TRACE3(Ttcclib, 8, "tscopy(): fromfile = \"%s\", tofile = \"%s\"",
@@ -340,7 +340,7 @@ char *fromfile, *todir;
}
else {
rc = tsc2(ifd, fromfile, tofile);
- (void) CLOSE(ifd);
+ CLOSE(ifd);
}
TRACE2(Ttcclib, 9, "tscopy() return %s", tet_ptrepcode(rc));
@@ -389,7 +389,7 @@ char *fromfile, *tofile;
else if (CHMOD(tofile, (mode_t) (stbuf.st_mode & MODEMASK)) < 0)
error(errno, "warning: can't chmod", tofile);
- (void) CLOSE(ofd);
+ CLOSE(ofd);
return(rc);
}
diff --git a/src/tet3/tcclib/rmrf.c b/src/tet3/tcclib/rmrf.c
index 8ea627d8..03b76b7d 100644
--- a/src/tet3/tcclib/rmrf.c
+++ b/src/tet3/tcclib/rmrf.c
@@ -98,12 +98,12 @@ char *path;
** otherwise, this is a file so just unlink it
*/
if (S_ISDIR(stbuf.st_mode)) {
- (void) sprintf(file, "%.*s/", (int) sizeof file - 2, path);
+ sprintf(file, "%.*s/", (int) sizeof file - 2, path);
p = file + strlen(file);
if ((files = tcf_lsdir(path)) == (char **) 0)
return(-1);
for (fip = files; *fip; fip++) {
- (void) sprintf(p, "%.*s",
+ sprintf(p, "%.*s",
(int) sizeof file - (int) (p - file) - 1, *fip);
if (tcf_rmrf(file) < 0)
rc = -1;
diff --git a/src/tet3/tcclib/sharlock.c b/src/tet3/tcclib/sharlock.c
index 24b067e6..88002a06 100644
--- a/src/tet3/tcclib/sharlock.c
+++ b/src/tet3/tcclib/sharlock.c
@@ -96,7 +96,7 @@ int timeout;
ASSERT(dir && *dir);
/* format the pid string */
- (void) sprintf(pidstr, "%05lu", pid);
+ sprintf(pidstr, "%05lu", pid);
/* allocate storage for the lock file name */
if (BUFCHK(&fname, &fnamelen, (int) (strlen(dir) + strlen(pidstr)) + 4) < 0)
@@ -119,7 +119,7 @@ int timeout;
}
for (salt1 = 'a'; salt1 <= 'z'; salt1++) {
for (salt2 = 'a'; salt2 <= 'z'; salt2++) {
- (void) sprintf(fname, "%s/%s%c%c",
+ sprintf(fname, "%s/%s%c%c",
dir, pidstr, salt1, salt2);
if ((fd = OPEN(fname, O_RDONLY | O_CREAT | O_EXCL, FILEMODE)) >= 0 || errno != EEXIST)
break;
@@ -149,11 +149,11 @@ int timeout;
}
if (timeout > 0 && time((time_t *) 0) > start + timeout)
return(ER_TIMEDOUT);
- (void) SLEEP(2);
+ SLEEP(2);
}
/* all ok so close the file and return success */
- (void) CLOSE(fd);
+ CLOSE(fd);
*lnp = fname;
return(ER_OK);
}
diff --git a/src/tet3/tcclib/tcfexec.c b/src/tet3/tcclib/tcfexec.c
index 5e847614..4b4e4049 100644
--- a/src/tet3/tcclib/tcfexec.c
+++ b/src/tet3/tcclib/tcfexec.c
@@ -137,7 +137,7 @@ int flag, *pidp;
return(ER_ERR);
}
else if (tet_fioclex(fd) < 0) {
- (void) close(fd);
+ close(fd);
return(ER_ERR);
}
}
@@ -154,14 +154,14 @@ int flag, *pidp;
if ((pid = tet_dofork()) == 0) {
/* in child */
if (fd >= 0) {
- (void) fflush(stdout);
- (void) close(1);
+ fflush(stdout);
+ close(1);
if (fcntl(fd, F_DUPFD, 1) != 1) {
error(errno, "can't dup stdout", (char *) 0);
_exit(~0);
}
- (void) fflush(stderr);
- (void) close(2);
+ fflush(stderr);
+ close(2);
if (fcntl(fd, F_DUPFD, 2) != 2) {
error(errno, "can't dup stderr", (char *) 0);
_exit(~0 - 1);
@@ -169,10 +169,10 @@ int flag, *pidp;
}
for (n = tet_getdtablesize() - 1; n > 2; n--) {
if (n != fd)
- (void) close(n);
+ close(n);
}
tcc_exec_signals();
- (void) execvp(path, argv);
+ execvp(path, argv);
error(errno, "can't exec", path);
switch (flag) {
case TCF_EXEC_TEST:
@@ -194,7 +194,7 @@ int flag, *pidp;
/* close outfile in the parent if one was specified */
if (fd >= 0)
- (void) close(fd);
+ close(fd);
TRACE3(Ttcclib, 4, "after exec: pid = %s, return %s",
@@ -242,7 +242,7 @@ char *file;
if (p2 > fname && p2 < &fname[sizeof fname - 2])
*p2++ = '/';
*p2 = '\0';
- (void) sprintf(p2, "%.*s",
+ sprintf(p2, "%.*s",
(int) (&fname[sizeof fname - 1] - p2), file);
TRACE2(Ttcclib, 6, "checkexec: try \"%s\"", fname);
if (tet_eaccess(fname, 01) == 0)
@@ -282,7 +282,7 @@ long snid;
tet_ptrepcode(tet_sderrno));
SLEEP(2);
- (void) tet_sdlogoff(0);
+ tet_sdlogoff(0);
#endif /* !TET_LITE */ /* -END-LITE-CUT- */
}
diff --git a/src/tet3/tcm/child.c b/src/tet3/tcm/child.c
index 379159d7..e4849958 100644
--- a/src/tet3/tcm/child.c
+++ b/src/tet3/tcm/child.c
@@ -117,7 +117,7 @@ char **argv;
TET_THR_KEYCREATE(&tet_sequence_key) != 0)
{
/* can't use tet_error() yet */
- (void) fprintf(stderr,
+ fprintf(stderr,
"%s: TET_THR_KEYCREATE() failed in TCM startup",
tet_progname);
exit(EXIT_FAILURE);
diff --git a/src/tet3/tcm/ckversion.c b/src/tet3/tcm/ckversion.c
index 86b98546..e6f3bdae 100644
--- a/src/tet3/tcm/ckversion.c
+++ b/src/tet3/tcm/ckversion.c
@@ -97,7 +97,7 @@ static void rptversion PROTOLIST((char *, char **));
void tet_check_apilib_version()
{
if (mstrcmp(tet_apilib_version, expected_apilib_version)) {
- (void) fprintf(stderr,
+ fprintf(stderr,
"%s: using wrong version of the API library\n",
tet_progname);
rptversion("expected", expected_apilib_version);
@@ -137,10 +137,10 @@ char **sp1, **sp2;
static void rptversion(s, sp)
char *s, **sp;
{
- (void) fprintf(stderr, "%s: %s version:", tet_progname, s);
+ fprintf(stderr, "%s: %s version:", tet_progname, s);
while (*sp)
- (void) fprintf(stderr, " %s", *sp++);
- (void) putc('\n', stderr);
- (void) fflush(stderr);
+ fprintf(stderr, " %s", *sp++);
+ putc('\n', stderr);
+ fflush(stderr);
}
diff --git a/src/tet3/tcm/dtcm.c b/src/tet3/tcm/dtcm.c
index 4e84ff63..331886d7 100644
--- a/src/tet3/tcm/dtcm.c
+++ b/src/tet3/tcm/dtcm.c
@@ -262,7 +262,7 @@ char **argv;
TET_THR_KEYCREATE(&tet_sequence_key) != 0)
{
/* can't use tet_error() yet */
- (void) fprintf(stderr,
+ fprintf(stderr,
"%s: TET_THR_KEYCREATE() failed in TCM startup",
tet_pname);
exit(EXIT_FAILURE);
@@ -449,13 +449,13 @@ int icnum, tpnum, testnum;
if (sigsetjmp(skipjmp, 1) != 0)
{
/* we've caught an unexpected signal! */
- (void) sprintf(buf, "unexpected signal %d (%s) received",
+ sprintf(buf, "unexpected signal %d (%s) received",
signum, tet_signame(signum));
tet_infoline(buf);
tet_result(TET_UNRESOLVED);
if (tet_child > 0)
{
- (void) tet_killw(tet_child, KILLWAIT);
+ tet_killw(tet_child, KILLWAIT);
tet_child = 0;
}
# ifdef TET_THREADS
@@ -523,7 +523,7 @@ int icnum, tpnum, testnum;
TRACE3(tet_Ttcm, 1,
"about to call tet_invoketp(%s, %s)",
tet_i2a(icnum), tet_i2a(tpnum));
- (void) tet_invoketp(icnum, tpnum);
+ tet_invoketp(icnum, tpnum);
#ifdef TET_THREADS
tet_cln_threads(0);
tet_mtx_destroy();
@@ -560,19 +560,19 @@ int sig;
# ifdef TET_THREADS
if (!TET_THR_EQUAL(TET_THR_SELF(), tet_start_tid))
{
- (void) TET_THR_KILL(tet_start_tid, sig);
+ TET_THR_KILL(tet_start_tid, sig);
TET_THR_EXIT((void *)0);
}
# endif /* TET_THREADS */
- (void) sprintf(mbuf,
+ sprintf(mbuf,
"Abandoning testset: caught unexpected signal %d (%s)",
sig, tet_signame(sig));
tet_error(0, mbuf);
# ifdef TET_LITE /* -LITE-CUT-LINE- */
if (tet_tmpresfile != NULL)
- (void) UNLINK(tet_tmpresfile);
+ UNLINK(tet_tmpresfile);
# endif /* -LITE-CUT-LINE- */
/* log off all the servers and exit */
@@ -589,14 +589,14 @@ sigterm()
/* terminate [per-thread] child, if any */
if (tet_child > 0)
{
- (void) tet_killw(tet_child, KILLWAIT);
+ tet_killw(tet_child, KILLWAIT);
tet_child = 0;
}
# ifdef TET_THREADS
if (!TET_THR_EQUAL(TET_THR_SELF(), tet_start_tid))
{
- (void) TET_THR_KILL(tet_start_tid, SIGTERM);
+ TET_THR_KILL(tet_start_tid, SIGTERM);
TET_THR_EXIT((void *)0);
}
@@ -608,7 +608,7 @@ sigterm()
# ifdef TET_LITE /* -LITE-CUT-LINE- */
if (tet_tmpresfile != NULL)
- (void) UNLINK(tet_tmpresfile);
+ UNLINK(tet_tmpresfile);
# endif /* TET_LITE */ /* -LITE-CUT-LINE- */
/* call user-supplied cleanup function */
@@ -648,7 +648,7 @@ int sig;
# ifdef TET_THREADS
if (!TET_THR_EQUAL(TET_THR_SELF(), tet_start_tid))
{
- (void) TET_THR_KILL(tet_start_tid, sig);
+ TET_THR_KILL(tet_start_tid, sig);
TET_THR_EXIT((void *)0);
}
# endif /* TET_THREADS */
@@ -671,7 +671,7 @@ sigset_t *set;
char *list, *sname;
int snum;
- (void) sigemptyset(set);
+ sigemptyset(set);
list = tet_getvar(var);
if (list == NULL)
@@ -685,14 +685,14 @@ sigset_t *set;
/* Check it's not a standard signal */
if (strncmp(tet_signame(snum), "SIG", (size_t)3) == 0)
{
- (void) sprintf(buf,
+ sprintf(buf,
"warning: illegal entry \"%s\" in %s ignored",
sname, var);
tet_error(0, buf);
}
else if (sigaddset(set, snum) == -1)
{
- (void) sprintf(buf,
+ sprintf(buf,
"warning: sigaddset() failed on entry \"%s\" in %s",
sname, var);
tet_error(0, buf);
@@ -725,7 +725,7 @@ void (*func)();
init_done = 1;
}
- (void) sigemptyset(&tet_blockable_sigs);
+ sigemptyset(&tet_blockable_sigs);
/* NSIG is not provided by POSIX.1: it must be defined via
an extra feature-test macro, or on the compiler command line */
@@ -740,13 +740,13 @@ void (*func)();
else
sig.sa_handler = func;
sig.sa_flags = 0;
- (void) sigemptyset(&sig.sa_mask);
+ sigemptyset(&sig.sa_mask);
if (sigaction(i, &sig, (struct sigaction *)NULL) == 0 &&
# ifdef SIGBUS
i != SIGBUS &&
# endif
i != SIGSEGV && i != SIGILL && i != SIGFPE)
- (void) sigaddset(&tet_blockable_sigs, i);
+ sigaddset(&tet_blockable_sigs, i);
}
}
@@ -823,7 +823,7 @@ char *functype;
case SS_SYNCYES:
break;
default:
- (void) sprintf(errmsg,
+ sprintf(errmsg,
"%s function Auto Sync error, sysid = %d, state = %s",
functype, sp->sy_sysid,
tet_systate(sp->sy_state));
@@ -879,12 +879,12 @@ int nicspec;
*/
err = 0;
if (!tet_isdefic(icmin)) {
- (void) sprintf(msg, fmt, "min", icmin, icmin);
+ sprintf(msg, fmt, "min", icmin, icmin);
tet_error(0, msg);
err = 1;
}
if (!tet_isdefic(icmax)) {
- (void) sprintf(msg, fmt, "max", icmax, icmax);
+ sprintf(msg, fmt, "max", icmax, icmax);
tet_error(0, msg);
icmax = 1;
err = 1;
@@ -934,7 +934,7 @@ int icmin, icmax;
for (p = icspec; *p; p++)
if (*p == ',')
break;
- (void) sprintf(buf, "%.*s",
+ sprintf(buf, "%.*s",
TET_MIN((int) (p - icspec), (int) sizeof buf - 1),
icspec);
build_icl3(buf, icmin, icmax);
@@ -1008,7 +1008,7 @@ int icmin, icmax;
** print a diagnostic if the specified start IC does not exist
*/
if (!tet_isdefic(icstart)) {
- (void) sprintf(msg, fmt, icstart);
+ sprintf(msg, fmt, icstart);
tet_error(0, msg);
while (++icstart <= icend)
if (tet_isdefic(icstart))
@@ -1032,7 +1032,7 @@ int icmin, icmax;
** print a diagnostic if the specified end IC does not exist
*/
if (icstart != icend && !tet_isdefic(icend)) {
- (void) sprintf(msg, fmt, icend);
+ sprintf(msg, fmt, icend);
tet_error(0, msg);
while (--icend > icstart)
if (tet_isdefic(icend))
diff --git a/src/tet3/tcm/ictp.c b/src/tet3/tcm/ictp.c
index f06b494c..57618510 100644
--- a/src/tet3/tcm/ictp.c
+++ b/src/tet3/tcm/ictp.c
@@ -212,7 +212,7 @@ int icno, tpcount;
{
char buf[128];
- (void) sprintf(buf, "%d %d %s", icno, tpcount, curtime());
+ sprintf(buf, "%d %d %s", icno, tpcount, curtime());
lite_output(TET_JNL_IC_START, buf, "IC Start");
return(0);
}
@@ -244,7 +244,7 @@ int icno, tpcount;
ASSERT(tet_synreq);
if (tet_tcm_async(MK_ASPNO(icno, 0, S_ICSTART), SV_YES, SV_SYNC_TIMEOUT,
tet_synreq, &nsys) < 0) {
- (void) sprintf(errmsg,
+ sprintf(errmsg,
"Auto Sync failed at start of IC %d", icno);
tet_error(tet_sderrno, errmsg);
tet_exit(EXIT_FAILURE);
@@ -267,7 +267,7 @@ int icno, tpcount;
break;
/* else fall through */
default:
- (void) sprintf(errmsg,
+ sprintf(errmsg,
"Auto sync error at start of IC %d, sysid = %d, state = %s",
icno, sp->sy_sysid, tet_systate(sp->sy_state));
tet_error(tet_sderrno, errmsg);
@@ -309,7 +309,7 @@ int icno, tpcount;
{
char buf[128];
- (void) sprintf(buf, "%d %d %s", icno, tpcount, curtime());
+ sprintf(buf, "%d %d %s", icno, tpcount, curtime());
lite_output(TET_JNL_IC_END, buf, "IC End");
}
@@ -358,17 +358,17 @@ int icno, tpno, testnum;
{
char buf[128];
- (void) sprintf(buf, "%d %s", testnum, curtime());
+ sprintf(buf, "%d %s", testnum, curtime());
lite_output(TET_JNL_TP_START, buf, "TP Start");
/* create temporary result file */
- (void) remove(tet_tmpresfile);
+ remove(tet_tmpresfile);
if ((tet_tmpresfp = fopen(tet_tmpresfile, "a+b")) == (FILE *) 0)
fatal(errno, "cannot create temporary result file:",
tet_tmpresfile);
/* override umask (must be writable by set-uid children) */
- (void) CHMOD(tet_tmpresfile, MODE666);
+ CHMOD(tet_tmpresfile, MODE666);
/*
** put pathname in environment to be picked up by tet_result() in
@@ -406,7 +406,7 @@ int icno, tpno, testnum;
ASSERT(tet_synreq);
if (tet_tcm_async(MK_ASPNO(icno, tpno, S_TPSTART), vote,
SV_SYNC_TIMEOUT, tet_synreq, &nsys) < 0) {
- (void) sprintf(errmsg,
+ sprintf(errmsg,
"Auto Sync failed at start of TP %d", testnum);
tet_error(tet_sderrno, errmsg);
tet_exit(EXIT_FAILURE);
@@ -428,7 +428,7 @@ int icno, tpno, testnum;
tet_XSync_del = 1;
break;
default:
- (void) sprintf(errmsg,
+ sprintf(errmsg,
"Auto Sync error at start of TP %d, sysid = %d, state = %s",
testnum, sp->sy_sysid,
tet_systate(sp->sy_state));
@@ -518,9 +518,9 @@ int icno, tpno, testnum;
have_result = 0;
}
- (void) fclose(tet_tmpresfp);
- (void) UNLINK(tet_tmpresfile);
- (void) tet_putenv("TET_TMPRESFILE=");
+ fclose(tet_tmpresfp);
+ UNLINK(tet_tmpresfile);
+ tet_putenv("TET_TMPRESFILE=");
if (!have_result)
{
@@ -542,7 +542,7 @@ int icno, tpno, testnum;
}
}
- (void) sprintf(buf, "%d %d %s", testnum, result, curtime());
+ sprintf(buf, "%d %d %s", testnum, result, curtime());
lite_output(TET_JNL_TP_RESULT, buf, res);
/*
@@ -558,7 +558,7 @@ int icno, tpno, testnum;
tet_mtx_destroy();
tet_mtx_init();
# endif
- (void) sprintf(buf, "ABORT on result code %d \"%s\"",
+ sprintf(buf, "ABORT on result code %d \"%s\"",
result, res);
lite_output(TET_JNL_TCM_INFO, "", buf);
return(-1);
@@ -588,7 +588,7 @@ int icno, tpno, testnum;
ASSERT(tet_synreq);
if (tet_tcm_async(MK_ASPNO(icno, tpno, S_TPEND), SV_YES,
SV_SYNC_TIMEOUT * 10, tet_synreq, &nsys) < 0) {
- (void) sprintf(errmsg,
+ sprintf(errmsg,
"Auto Sync failed at end of TP %d", testnum);
tet_error(tet_sderrno, errmsg);
tet_exit(EXIT_FAILURE);
@@ -612,7 +612,7 @@ int icno, tpno, testnum;
case SS_SYNCYES:
break;
default:
- (void) sprintf(errmsg,
+ sprintf(errmsg,
"Auto Sync error at end of TP %d, sysid = %d, state = %s",
testnum, sp->sy_sysid,
tet_systate(sp->sy_state));
@@ -641,7 +641,7 @@ static int mtcm_tpend2()
register struct synreq *sp;
/* signal TP end to XRESD */
- (void) tet_xdtpend(tet_xrid);
+ tet_xdtpend(tet_xrid);
switch (tet_xderrno) {
case ER_OK:
return(0);
@@ -689,7 +689,7 @@ static int mtcm_tpend2()
case SS_SYNCNO:
break;
default:
- (void) sprintf(errmsg,
+ sprintf(errmsg,
"Abort Auto Sync error, sysid = %d, state = %s",
sp->sy_sysid,
tet_systate(sp->sy_state));
@@ -720,7 +720,7 @@ int no_ics;
#ifdef TET_LITE /* -LITE-CUT-LINE- */
- (void) sprintf(buf, "%s %d", versn, no_ics);
+ sprintf(buf, "%s %d", versn, no_ics);
lite_output(TET_JNL_TCM_START, buf, "TCM Start");
#else /* -START-LITE-CUT- */
@@ -728,7 +728,7 @@ int no_ics;
if (!ismaster())
return;
- (void) sprintf(buf, "%d|%ld %s %d|TCM Start",
+ sprintf(buf, "%d|%ld %s %d|TCM Start",
TET_JNL_TCM_START, tet_activity, versn, no_ics);
if (tet_xdxres(tet_xrid, buf) < 0) {
@@ -835,13 +835,13 @@ char *progname;
/* create the execution results file and open in append mode */
- (void) remove(resfile);
+ remove(resfile);
tet_resfp = fopen(resfile, "a");
if (tet_resfp == NULL)
fatal(errno, "cannot create results file:", resfile);
/* override umask (must be writable by set-uid children) */
- (void) CHMOD(resfile, MODE666);
+ CHMOD(resfile, MODE666);
tet_combined_ok = 1;
}
@@ -863,7 +863,7 @@ char *data;
if (data == NULL)
data = "";
- (void) sprintf(header, fmt, mtype, tet_activity,
+ sprintf(header, fmt, mtype, tet_activity,
fields[0] == '\0' ? "" : " ", fields);
tet_msgform(header, data, outbuf);
obp = outbuf;
@@ -880,9 +880,9 @@ static char *curtime()
struct tm *tp;
static char s[10];
- (void) time(&t);
+ time(&t);
tp = localtime(&t);
- (void) sprintf(s, "%02d:%02d:%02d", tp->tm_hour,
+ sprintf(s, "%02d:%02d:%02d", tp->tm_hour,
tp->tm_min, tp->tm_sec);
return s;
diff --git a/src/tet3/tcm/tcm_xt.c b/src/tet3/tcm/tcm_xt.c
index 934167ef..5eb5e4ec 100644
--- a/src/tet3/tcm/tcm_xt.c
+++ b/src/tet3/tcm/tcm_xt.c
@@ -176,7 +176,7 @@ int ptype;
tp->tp_call.maxlen = np->maxlen;
tp->tp_call.len = np->len;
- (void) memcpy(tp->tp_call.buf, np->buf, np->len);
+ memcpy(tp->tp_call.buf, np->buf, np->len);
*paddr = pp;
}
@@ -268,7 +268,7 @@ register int ptype;
return (-1);
}
mp->ts.osico.ts_len = tp->tp_call.len;
- (void) memcpy(mp->ts.osico.ts_nsap, tp->tp_call.buf, tp->tp_call.len);
+ memcpy(mp->ts.osico.ts_nsap, tp->tp_call.buf, tp->tp_call.len);
break;
#endif
diff --git a/src/tet3/tcm/tcmfuncs.c b/src/tet3/tcm/tcmfuncs.c
index abfdb2f4..eb57cc99 100644
--- a/src/tet3/tcm/tcmfuncs.c
+++ b/src/tet3/tcm/tcmfuncs.c
@@ -149,7 +149,7 @@ char **argv;
/* get TET_ROOT out of the environment */
if ((envstring = getenv(tetroot_name)) == (char *) 0 || !*envstring)
envstring = strdup(".");
- (void) sprintf(tet_root, "%.*s", (int) sizeof tet_root - 1, envstring);
+ sprintf(tet_root, "%.*s", (int) sizeof tet_root - 1, envstring);
/* get the dtet ti args out of the environment and count them */
if ((envstring = getenv(tiargs_name)) == (char *) 0 || !*envstring) {
@@ -339,7 +339,7 @@ char **argv;
case SS_SYNCYES:
break;
default:
- (void) sprintf(errmsg,
+ sprintf(errmsg,
"initial sync error, sysid = %d, state = %s",
sp->sy_sysid,
tet_systate(sp->sy_state));
@@ -371,7 +371,7 @@ void tet_dtcmerror(int errnum, const char *file, int line,
int combined_save = 0;
/* start the buffer with filename and line number */
- (void) sprintf(p, "(%s, %d): ", tet_basename(file), line);
+ sprintf(p, "(%s, %d): ", tet_basename(file), line);
p += strlen(p);
/* append the first message string */
diff --git a/src/tet3/xresd/tfproc.c b/src/tet3/xresd/tfproc.c
index 5eac0601..ec7a4747 100644
--- a/src/tet3/xresd/tfproc.c
+++ b/src/tet3/xresd/tfproc.c
@@ -172,7 +172,7 @@ char *tfname;
/* construct the transfer file name and store it */
len = (int) sizeof tfpath - (int) strlen(Tet_savedir) - 2;
- (void) sprintf(tfpath, "%.*s/%.*s",
+ sprintf(tfpath, "%.*s/%.*s",
(int) sizeof tfpath - 2, Tet_savedir, TET_MAX(len, 0), tfname);
if ((tp->tf_name = tet_strstore(tfpath)) == (char *) 0)
return(ER_ERR);
@@ -288,7 +288,7 @@ register struct ptab *pp;
done = 1;
for (tp = tftab; tp; tp = tp->tf_next)
if (tp->tf_ptab == pp) {
- (void) dotfclose(tp);
+ dotfclose(tp);
done = 0;
break;
}
diff --git a/src/tet3/xresd/xresd.c b/src/tet3/xresd/xresd.c
index fe227bee..0e74c143 100644
--- a/src/tet3/xresd/xresd.c
+++ b/src/tet3/xresd/xresd.c
@@ -191,7 +191,7 @@ register struct ptab *pp;
/* emit a diagnostic message if this is unexpected */
if ((pp->pt_flags & PF_LOGGEDOFF) == 0) {
- (void) sprintf(msg, fmt, (pp->pt_flags & PF_SERVER) ? se : cl);
+ sprintf(msg, fmt, (pp->pt_flags & PF_SERVER) ? se : cl);
error(0, msg, tet_r2a(&pp->pt_rid));
}
diff --git a/src/tet3/xresd/xresproc.c b/src/tet3/xresd/xresproc.c
index a9c693ad..dfadd68b 100644
--- a/src/tet3/xresd/xresproc.c
+++ b/src/tet3/xresd/xresproc.c
@@ -725,7 +725,7 @@ register struct ptab *pp;
text = tet_getresname(result, &abflag);
if (abflag && (xp->xt_flags & XF_TCABORT) == 0) {
xp->xt_flags |= XF_TCABORT;
- (void) sprintf(buf, fmt, result);
+ sprintf(buf, fmt, result);
xrinfo(xp, buf, text ? text : gcerr);
}
}
@@ -830,19 +830,19 @@ register int code;
/* format the variable part of the message */
switch (code) {
case TET_JNL_IC_START:
- (void) sprintf(buf, "%d %d", xp->xt_icno, xp->xt_tpcount);
+ sprintf(buf, "%d %d", xp->xt_icno, xp->xt_tpcount);
text = "IC Start";
break;
case TET_JNL_IC_END:
- (void) sprintf(buf, "%d %d", xp->xt_icno, xp->xt_tpcount);
+ sprintf(buf, "%d %d", xp->xt_icno, xp->xt_tpcount);
text = "IC End";
break;
case TET_JNL_TP_START:
- (void) sprintf(buf, "%d", xp->xt_tpno);
+ sprintf(buf, "%d", xp->xt_tpno);
text = "TP Start";
break;
case TET_JNL_TP_RESULT:
- (void) sprintf(buf, "%d %d", xp->xt_tpno, xp->xt_result);
+ sprintf(buf, "%d %d", xp->xt_tpno, xp->xt_result);
if ((text = tet_getresname(xp->xt_result, (int *) 0)) == (char *) 0)
text = "(NO RESULT NAME)";
break;
@@ -938,7 +938,7 @@ int state;
case XS_DEAD:
return("DEAD");
default:
- (void) sprintf(msg, "%s%d", text, state);
+ sprintf(msg, "%s%d", text, state);
return(msg);
}
}
diff --git a/src/tet3/xresd/xtab.c b/src/tet3/xresd/xtab.c
index 207b1324..b7f6dd0c 100644
--- a/src/tet3/xresd/xtab.c
+++ b/src/tet3/xresd/xtab.c
@@ -104,7 +104,7 @@ struct xtab *xp;
if (xp) {
if (xp->xt_xfp)
- (void) fclose(xp->xt_xfp);
+ fclose(xp->xt_xfp);
if (xp->xt_xfname) {
TRACE2(tet_Tbuf, 6, "free xtab xfname = %s",
tet_i2x(xp->xt_xfname));
@@ -164,9 +164,9 @@ void xtrm(xp)
struct xtab *xp;
{
if (xp->xt_flags & XF_TPINPROGRESS)
- (void) tpend(xp);
+ tpend(xp);
if (xp->xt_flags & XF_ICINPROGRESS)
- (void) icend(xp);
+ icend(xp);
tet_listremove((struct llist **) &xtab, (struct llist *) xp);
}
@@ -219,9 +219,9 @@ register struct ptab *pp;
count++;
if (count == xp->xt_nud) {
if (xp->xt_flags & XF_TPINPROGRESS)
- (void) tpend(xp);
+ tpend(xp);
if (xp->xt_flags & XF_ICINPROGRESS)
- (void) icend(xp);
+ icend(xp);
if (!xp->xt_ptab) {
xtrm(xp);
xtfree(xp);
diff --git a/src/tet3/xtilib/accept.c b/src/tet3/xtilib/accept.c
index 24565160..d308f7d6 100644
--- a/src/tet3/xtilib/accept.c
+++ b/src/tet3/xtilib/accept.c
@@ -112,7 +112,7 @@ int lfd;
/* bind this endpoint to an arbitrary protocol address */
if (t_bind(nfd, (struct t_bind *) 0, (struct t_bind *) 0) < 0) {
xt_error(t_errno, "can't bind fd", tet_i2a(nfd));
- (void) t_close(nfd);
+ t_close(nfd);
tet_ptfree(pp);
return;
}
@@ -130,7 +130,7 @@ int lfd;
xt_error(t_errno,"unexpected event",
tet_xtev2a(c_event));
}
- (void) t_close(nfd);
+ t_close(nfd);
tet_ptfree(pp);
return;
}
@@ -152,12 +152,12 @@ int lfd;
TRACE2(tet_Tbuf, 6, "allocate tp_call.buf = %s",
tet_i2x(tp->tp_call.buf));
- (void) memcpy(tp->tp_call.buf, tet_calls[i]->addr.buf,
+ memcpy(tp->tp_call.buf, tet_calls[i]->addr.buf,
(size_t)tet_calls[i]->addr.len);
TRACE3(tet_Tbuf, 6, "t_free tet_calls[%s] = %s",
tet_i2a(i), tet_i2x(tet_calls[i]));
- (void) t_free((char *)tet_calls[i], T_CALL);
+ t_free((char *)tet_calls[i], T_CALL);
tet_calls[i] = (struct t_call *)0;
diff --git a/src/tet3/xtilib/addr2lname.c b/src/tet3/xtilib/addr2lname.c
index c1a5c05a..1479519e 100644
--- a/src/tet3/xtilib/addr2lname.c
+++ b/src/tet3/xtilib/addr2lname.c
@@ -67,7 +67,7 @@ struct netbuf *np;
return (char *)0;
while (len--) {
- (void) sprintf(p,"%02x", (unsigned char) *q++);
+ sprintf(p,"%02x", (unsigned char) *q++);
p += 2;
}
*p = '\0';
diff --git a/src/tet3/xtilib/connect.c b/src/tet3/xtilib/connect.c
index 044d2d06..006ab45f 100644
--- a/src/tet3/xtilib/connect.c
+++ b/src/tet3/xtilib/connect.c
@@ -101,14 +101,14 @@ register struct ptab *pp;
pp->pt_flags |= PF_ATTENTION;
return;
}
- (void) t_close(fd);
+ t_close(fd);
fd = nfd;
}
/* bind this endpoint to an arbitrary protocol address */
if (t_bind(fd, (struct t_bind *)0, (struct t_bind *)0) < 0) {
xt_error(t_errno, "can't bind fd", tet_i2a(fd));
- (void) t_close(fd);
+ t_close(fd);
pp->pt_state = PS_DEAD;
pp->pt_flags |= PF_ATTENTION;
return;
@@ -153,11 +153,11 @@ register struct ptab *pp;
default:
event = tet_xtev2a(t_look(fd));
TRACE2(tet_Tio, 6, "connect failed:%s", event);
- (void) sprintf(buf, "%s(%.*s)", "connect failed",
+ sprintf(buf, "%s(%.*s)", "connect failed",
(int) sizeof buf - (int) strlen(event) - 17,
event);
xt_error(t_errno, buf, tet_r2a(&pp->pt_rid));
- (void) t_close(fd);
+ t_close(fd);
pp->pt_state = PS_DEAD;
break;
}
diff --git a/src/tet3/xtilib/discon.c b/src/tet3/xtilib/discon.c
index 65b65b4c..5650d375 100644
--- a/src/tet3/xtilib/discon.c
+++ b/src/tet3/xtilib/discon.c
@@ -70,7 +70,7 @@ struct ptab *pp;
tet_i2a(tp->tp_fd));
if (tp->tp_fd >= 0) {
- (void) t_close(tp->tp_fd);
+ t_close(tp->tp_fd);
tp->tp_fd = -1;
}
diff --git a/src/tet3/xtilib/poll.c b/src/tet3/xtilib/poll.c
index 3e4c0bdd..38b74715 100644
--- a/src/tet3/xtilib/poll.c
+++ b/src/tet3/xtilib/poll.c
@@ -115,7 +115,7 @@ int timeout;
while ((rc = ts_poll2(pp)) == 0) {
if (timeout >= 0 && time((time_t *) 0) >= start + timeout)
break;
- (void) sleep((unsigned) 1);
+ sleep((unsigned) 1);
}
return (rc);
#else
@@ -310,7 +310,7 @@ static int doaccept()
}
TRACE3(tet_Tbuf, 6, "t_free tet_calls[%s] = %s",
tet_i2a(i), tet_i2x(tet_calls[i]));
- (void) t_free((char *) tet_calls[i], T_CALL);
+ t_free((char *) tet_calls[i], T_CALL);
tet_calls[i] = (struct t_call *) 0;
return (rc);
}
@@ -330,7 +330,7 @@ static int doaccept()
if (t_rcvdis(tet_listen_fd, discon) < 0) {
xt_error(t_errno, "t_rcvdis() failed", (char *) 0);
TRACE2(tet_Tbuf, 6, "free discon = %s", tet_i2x(discon));
- (void) t_free((char *) discon, T_DIS);
+ t_free((char *) discon, T_DIS);
return(-1);
}
@@ -341,10 +341,10 @@ static int doaccept()
) {
TRACE3(tet_Tbuf, 6, "t_free tet_calls[%s] = %s",
tet_i2a(i), tet_i2x(tet_calls[i]));
- (void) t_free((char *) tet_calls[i], T_CALL);
+ t_free((char *) tet_calls[i], T_CALL);
TRACE2(tet_Tbuf, 6, "free discon = %s",
tet_i2x(discon));
- (void) t_free((char *) discon, T_DIS);
+ t_free((char *) discon, T_DIS);
tet_calls[i] = (struct t_call *) 0;
}
}
diff --git a/src/tet3/xtilib/rdwr.c b/src/tet3/xtilib/rdwr.c
index 3a9a3d66..b4687d07 100644
--- a/src/tet3/xtilib/rdwr.c
+++ b/src/tet3/xtilib/rdwr.c
@@ -112,7 +112,7 @@ register struct ptab *pp;
}
TDUMP(tet_Tio, 10, tp->tp_buf, DM_HDRSZ, msghdr);
pp->pt_flags &= ~PF_RCVHDR;
- (void) tet_bs2dtmhdr(tp->tp_buf, &pp->ptm_hdr, DM_HDRSZ);
+ tet_bs2dtmhdr(tp->tp_buf, &pp->ptm_hdr, DM_HDRSZ);
if (pp->ptm_magic != DTM_MAGIC && pp->ptm_len) {
/* we are probably out of sync with sender */
error(0, "received bad message header,",
@@ -271,7 +271,7 @@ register struct ptab *pp;
rc, msgdata);
tp->tp_cnt += rc;
}
- (void) tet_dmlen2bs(rc, tp->tp_buf);
+ tet_dmlen2bs(rc, tp->tp_buf);
} while (err);
tp->tp_ptr = tp->tp_buf;
pp->pt_flags |= PF_INPROGRESS;
@@ -428,7 +428,7 @@ register struct ptab *pp;
TRACE2(tet_Tio, 4, "tet_ts_dead: close fd %s", tet_i2a(tp->tp_fd));
- (void) t_close(tp->tp_fd);
+ t_close(tp->tp_fd);
tp->tp_fd = -1;
pp->pt_flags &= ~(PF_CONNECTED | PF_INPROGRESS);
}
diff --git a/src/tet3/xtilib/tccdaddr.c b/src/tet3/xtilib/tccdaddr.c
index 562eddb0..82562c82 100644
--- a/src/tet3/xtilib/tccdaddr.c
+++ b/src/tet3/xtilib/tccdaddr.c
@@ -95,7 +95,7 @@ struct ptab *pp;
/* all ok so fill in the address details */
tp->tp_call.maxlen = np->maxlen;
tp->tp_call.len = np->len;
- (void) memcpy(tp->tp_call.buf, np->buf, (size_t)np->len);
+ memcpy(tp->tp_call.buf, np->buf, (size_t)np->len);
return(0);
}
diff --git a/src/tet3/xtilib/xtierror.c b/src/tet3/xtilib/xtierror.c
index 2d63f352..9ed5204a 100644
--- a/src/tet3/xtilib/xtierror.c
+++ b/src/tet3/xtilib/xtierror.c
@@ -72,24 +72,24 @@ void tet_xtierror(int errnum, const char *file, int line, const char *s1,
const char *s3;
int save_errno = errno;
- (void) fprintf(stderr, "%s (%s, %d): %s",
+ fprintf(stderr, "%s (%s, %d): %s",
tet_progname, tet_basename(file), line, s1);
if (s2 && *s2)
- (void) fprintf(stderr, " %s", s2);
+ fprintf(stderr, " %s", s2);
if (errnum > 0) {
if (errnum == TSYSERR) {
if ((s3 = strerror(save_errno)) == (char *) 0)
- (void) fprintf(stderr, ", errno = %s",
+ fprintf(stderr, ", errno = %s",
tet_errname(save_errno));
else
- (void) fprintf(stderr, ": %s", s3);
+ fprintf(stderr, ": %s", s3);
}
else
- (void) fprintf(stderr, ": %s", tet_xterrno2a(errnum));
+ fprintf(stderr, ": %s", tet_xterrno2a(errnum));
}
- (void) putc('\n', stderr);
- (void) fflush(stderr);
+ putc('\n', stderr);
+ fflush(stderr);
errno = 0;
t_errno = 0;
@@ -195,7 +195,7 @@ int n;
#endif
default :
- (void) sprintf(buf, fmt, n);
+ sprintf(buf, fmt, n);
return (buf);
}
}
@@ -243,7 +243,7 @@ int n;
#endif
default :
- (void) sprintf(buf, fmt, n);
+ sprintf(buf, fmt, n);
return (buf);
}