mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 21:05:08 +00:00
stress2: Avoid using "__unused"
This commit is contained in:
parent
267411d164
commit
6b7a06c3bd
|
@ -65,8 +65,9 @@ test(void) {
|
|||
struct procctl_reaper_kill killemall;
|
||||
pid_t pid;
|
||||
time_t start;
|
||||
int data[20], e, n __unused, m;
|
||||
int data[20], debug, e, n, m;
|
||||
|
||||
debug = 0; /* set to 1 for debug output */
|
||||
n = m = 0;
|
||||
if (procctl(P_PID, getpid(), PROC_REAP_ACQUIRE, NULL) == -1)
|
||||
err(EXIT_FAILURE, "Fail to acquire the reaper");
|
||||
|
@ -94,9 +95,8 @@ test(void) {
|
|||
if (waitpid(pid, NULL, 0) != pid)
|
||||
err(1, "waitpid()");
|
||||
}
|
||||
#if defined(DEBUG)
|
||||
if (debug == 1)
|
||||
fprintf(stderr, "n = %d out of %d\n", n, m);
|
||||
#endif
|
||||
_exit(0);
|
||||
}
|
||||
|
||||
|
|
|
@ -59,14 +59,13 @@ flip(void *ap, size_t len)
|
|||
{
|
||||
unsigned char *cp;
|
||||
int byte;
|
||||
unsigned char bit, buf, mask, old __unused;
|
||||
unsigned char bit, buf, mask;
|
||||
|
||||
cp = (unsigned char *)ap;
|
||||
byte = random_long(0, len);
|
||||
bit = random_long(0,7);
|
||||
mask = ~(1 << bit);
|
||||
buf = cp[byte];
|
||||
old = cp[byte];
|
||||
buf = (buf & mask) | (~buf & ~mask);
|
||||
cp[byte] = buf;
|
||||
}
|
||||
|
@ -86,8 +85,9 @@ test(void) {
|
|||
struct procctl_reaper_kill killemall;
|
||||
pid_t pid;
|
||||
time_t start;
|
||||
int data[20], e, n __unused, m;
|
||||
int data[20], debug, e, n, m;
|
||||
|
||||
debug = 0; /* set to 1 for debug output */
|
||||
n = m = 0;
|
||||
if (procctl(P_PID, getpid(), PROC_REAP_ACQUIRE, NULL) == -1)
|
||||
err(EXIT_FAILURE, "Fail to acquire the reaper");
|
||||
|
@ -118,9 +118,8 @@ test(void) {
|
|||
if (waitpid(pid, NULL, 0) != pid)
|
||||
err(1, "waitpid()");
|
||||
}
|
||||
#if defined(DEBUG)
|
||||
if (debug == 1)
|
||||
fprintf(stderr, "n = %d out of %d\n", n, m);
|
||||
#endif
|
||||
_exit(0);
|
||||
}
|
||||
|
||||
|
|
|
@ -59,14 +59,13 @@ flip(void *ap, size_t len)
|
|||
{
|
||||
unsigned char *cp;
|
||||
int byte;
|
||||
unsigned char bit, buf, mask, old __unused;
|
||||
unsigned char bit, buf, mask;
|
||||
|
||||
cp = (unsigned char *)ap;
|
||||
byte = random_long(0, len);
|
||||
bit = random_long(0,7);
|
||||
mask = ~(1 << bit);
|
||||
buf = cp[byte];
|
||||
old = cp[byte];
|
||||
buf = (buf & mask) | (~buf & ~mask);
|
||||
cp[byte] = buf;
|
||||
}
|
||||
|
@ -85,8 +84,9 @@ test(void) {
|
|||
struct procctl_reaper_kill killemall;
|
||||
pid_t pid;
|
||||
time_t start;
|
||||
int data[20], e, n __unused, m;
|
||||
int data[20], debug, e, n, m;
|
||||
|
||||
debug = 0; /* set to 1 for debug output */
|
||||
n = m = 0;
|
||||
if (procctl(P_PID, getpid(), PROC_REAP_ACQUIRE, NULL) == -1)
|
||||
err(EXIT_FAILURE, "Fail to acquire the reaper");
|
||||
|
@ -117,9 +117,8 @@ test(void) {
|
|||
if (waitpid(pid, NULL, 0) != pid)
|
||||
err(1, "waitpid()");
|
||||
}
|
||||
#if defined(DEBUG)
|
||||
if (debug == 1)
|
||||
fprintf(stderr, "n = %d out of %d\n", n, m);
|
||||
#endif
|
||||
_exit(0);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue