summaryrefslogtreecommitdiff
path: root/usr.bin/tip
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2006-12-14 14:18:03 +0000
committerchristos <christos@NetBSD.org>2006-12-14 14:18:03 +0000
commit239d1ed1298ae2c5ed5c6e3f973b94ee576a96bd (patch)
tree38b332f86c0b9c795b0c533d433abdcdbfc933cb /usr.bin/tip
parent78509e7f311940191dce195ccadc53c23961d0c0 (diff)
kill the (void)&foo; from Anon Ymous
Diffstat (limited to 'usr.bin/tip')
-rw-r--r--usr.bin/tip/acu.c14
-rw-r--r--usr.bin/tip/aculib/biz22.c10
-rw-r--r--usr.bin/tip/aculib/courier.c19
-rw-r--r--usr.bin/tip/aculib/df.c14
-rw-r--r--usr.bin/tip/aculib/t3000.c19
-rw-r--r--usr.bin/tip/aculib/v3451.c17
-rw-r--r--usr.bin/tip/aculib/ventel.c11
-rw-r--r--usr.bin/tip/cmds.c14
-rw-r--r--usr.bin/tip/tip.c10
9 files changed, 48 insertions, 80 deletions
diff --git a/usr.bin/tip/acu.c b/usr.bin/tip/acu.c
index ad06ebbe819..a15f8ae066a 100644
--- a/usr.bin/tip/acu.c
+++ b/usr.bin/tip/acu.c
@@ -1,4 +1,4 @@
-/* $NetBSD: acu.c,v 1.13 2006/10/24 08:29:47 gson Exp $ */
+/* $NetBSD: acu.c,v 1.14 2006/12/14 14:18:03 christos Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)acu.c 8.1 (Berkeley) 6/6/93";
#endif
-__RCSID("$NetBSD: acu.c,v 1.13 2006/10/24 08:29:47 gson Exp $");
+__RCSID("$NetBSD: acu.c,v 1.14 2006/12/14 14:18:03 christos Exp $");
#endif /* not lint */
#include "tip.h"
@@ -65,15 +65,13 @@ static acu_t *acutype(char *);
const char *
connect(void)
{
- char * volatile cp = PN;
+ char * volatile cp;
char *phnum, string[256];
FILE *fd;
- int tried = 0;
+ int volatile tried;
-#if __GNUC__ /* XXX pacify gcc */
- (void)&cp;
- (void)&tried;
-#endif
+ cp = PN;
+ tried = 0;
if (!DU) { /* regular connect message */
if (CM != NULL)
diff --git a/usr.bin/tip/aculib/biz22.c b/usr.bin/tip/aculib/biz22.c
index 45d7779f0e5..9523264df52 100644
--- a/usr.bin/tip/aculib/biz22.c
+++ b/usr.bin/tip/aculib/biz22.c
@@ -1,4 +1,4 @@
-/* $NetBSD: biz22.c,v 1.11 2006/04/03 02:25:27 perry Exp $ */
+/* $NetBSD: biz22.c,v 1.12 2006/12/14 14:18:04 christos Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)biz22.c 8.1 (Berkeley) 6/6/93";
#endif
-__RCSID("$NetBSD: biz22.c,v 1.11 2006/04/03 02:25:27 perry Exp $");
+__RCSID("$NetBSD: biz22.c,v 1.12 2006/12/14 14:18:04 christos Exp $");
#endif /* not lint */
#include "tip.h"
@@ -155,15 +155,11 @@ cmd(const char *s)
}
static int
-detect(const char *s)
+detect(const char * volatile s)
{
sig_t f;
char c;
-#if __GNUC__ /* XXX pacify gcc */
- (void)&s;
-#endif
-
f = signal(SIGALRM, sigALRM);
btimeout = 0;
while (*s) {
diff --git a/usr.bin/tip/aculib/courier.c b/usr.bin/tip/aculib/courier.c
index e24d5f59114..d1c7f7b6ac2 100644
--- a/usr.bin/tip/aculib/courier.c
+++ b/usr.bin/tip/aculib/courier.c
@@ -1,4 +1,4 @@
-/* $NetBSD: courier.c,v 1.15 2006/04/03 02:25:27 perry Exp $ */
+/* $NetBSD: courier.c,v 1.16 2006/12/14 14:18:04 christos Exp $ */
/*
* Copyright (c) 1986, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)courier.c 8.1 (Berkeley) 6/6/93";
#endif
-__RCSID("$NetBSD: courier.c,v 1.15 2006/04/03 02:25:27 perry Exp $");
+__RCSID("$NetBSD: courier.c,v 1.16 2006/12/14 14:18:04 christos Exp $");
#endif /* not lint */
/*
@@ -133,15 +133,11 @@ sigALRM(int dummy)
}
static int
-cour_swallow(const char *match)
+cour_swallow(const char * volatile match)
{
sig_t f;
char c;
-#if __GNUC__ /* XXX pacify gcc */
- (void)&match;
-#endif
-
f = signal(SIGALRM, sigALRM);
timeout = 0;
do {
@@ -186,16 +182,13 @@ static int
cour_connect(void)
{
char c;
- int nc, nl, n;
+ int volatile nc;
+ int volatile nl;
+ int n;
char dialer_buf[64];
struct baud_msg *bm;
sig_t f;
-#if __GNUC__ /* XXX pacify gcc */
- (void)&nc;
- (void)&nl;
-#endif
-
if (cour_swallow("\r\n") == 0)
return (0);
f = signal(SIGALRM, sigALRM);
diff --git a/usr.bin/tip/aculib/df.c b/usr.bin/tip/aculib/df.c
index a77aac1b88b..1d002da453e 100644
--- a/usr.bin/tip/aculib/df.c
+++ b/usr.bin/tip/aculib/df.c
@@ -1,4 +1,4 @@
-/* $NetBSD: df.c,v 1.8 2006/04/03 00:51:14 perry Exp $ */
+/* $NetBSD: df.c,v 1.9 2006/12/14 14:18:04 christos Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)df.c 8.1 (Berkeley) 6/6/93";
#endif
-__RCSID("$NetBSD: df.c,v 1.8 2006/04/03 00:51:14 perry Exp $");
+__RCSID("$NetBSD: df.c,v 1.9 2006/12/14 14:18:04 christos Exp $");
#endif /* not lint */
/*
@@ -67,13 +67,11 @@ df_dialer(char *num, char *acu, int df03)
{
int f = FD;
struct termios cntrl;
- int spd = 0;
- char c = '\0';
-
-#if __GNUC__ /* XXX pacify gcc */
- (void)&spd;
-#endif
+ int volatile spd;
+ char c;
+ spd = 0;
+ c = '\0';
tcgetattr(f, &cntrl);
cntrl.c_cflag |= HUPCL;
tcsetattr(f, TCSANOW, &cntrl);
diff --git a/usr.bin/tip/aculib/t3000.c b/usr.bin/tip/aculib/t3000.c
index f08c7adfe2e..8c5dcebf8cb 100644
--- a/usr.bin/tip/aculib/t3000.c
+++ b/usr.bin/tip/aculib/t3000.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t3000.c,v 1.13 2006/04/03 02:25:27 perry Exp $ */
+/* $NetBSD: t3000.c,v 1.14 2006/12/14 14:18:04 christos Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)t3000.c 8.1 (Berkeley) 6/6/93";
#endif
-__RCSID("$NetBSD: t3000.c,v 1.13 2006/04/03 02:25:27 perry Exp $");
+__RCSID("$NetBSD: t3000.c,v 1.14 2006/12/14 14:18:04 christos Exp $");
#endif /* not lint */
/*
@@ -127,15 +127,11 @@ sigALRM(int dummy)
}
static int
-t3000_swallow(const char *match)
+t3000_swallow(const char * volatile match)
{
sig_t f;
char c;
-#if __GNUC__ /* XXX pacify gcc */
- (void)&match;
-#endif
-
f = signal(SIGALRM, sigALRM);
timeout = 0;
do {
@@ -194,16 +190,13 @@ static int
t3000_connect(void)
{
char c;
- int nc, nl, n;
+ int volatile nc;
+ int volatile nl;
+ int n;
char dialer_buf[64];
struct tbaud_msg *bm;
sig_t f;
-#if __GNUC__ /* XXX pacify gcc */
- (void)&nc;
- (void)&nl;
-#endif
-
if (t3000_swallow("\r\n") == 0)
return (0);
f = signal(SIGALRM, sigALRM);
diff --git a/usr.bin/tip/aculib/v3451.c b/usr.bin/tip/aculib/v3451.c
index 2981c2f49ef..9a1f4142b12 100644
--- a/usr.bin/tip/aculib/v3451.c
+++ b/usr.bin/tip/aculib/v3451.c
@@ -1,4 +1,4 @@
-/* $NetBSD: v3451.c,v 1.12 2006/04/03 02:25:27 perry Exp $ */
+/* $NetBSD: v3451.c,v 1.13 2006/12/14 14:18:04 christos Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)v3451.c 8.1 (Berkeley) 6/6/93";
#endif
-__RCSID("$NetBSD: v3451.c,v 1.12 2006/04/03 02:25:27 perry Exp $");
+__RCSID("$NetBSD: v3451.c,v 1.13 2006/12/14 14:18:04 christos Exp $");
#endif /* not lint */
/*
@@ -135,14 +135,13 @@ static int
expect(const char *cp)
{
char buf[300];
- char *rp = buf;
- int timeout = 30, online = 0;
+ char * volatile rp;
+ int volatile timeout;
+ int volatile online;
-#if __GNUC__ /* XXX pacify gcc */
- (void)&online;
- (void)&rp;
- (void)&timeout;
-#endif
+ rp = buf;
+ timeout = 30;
+ online = 0;
if (strcmp(cp, "\"\"") == 0)
return (1);
diff --git a/usr.bin/tip/aculib/ventel.c b/usr.bin/tip/aculib/ventel.c
index 55416d76a0a..7ca60f32451 100644
--- a/usr.bin/tip/aculib/ventel.c
+++ b/usr.bin/tip/aculib/ventel.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ventel.c,v 1.14 2006/04/03 02:25:27 perry Exp $ */
+/* $NetBSD: ventel.c,v 1.15 2006/12/14 14:18:04 christos Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)ventel.c 8.1 (Berkeley) 6/6/93";
#endif
-__RCSID("$NetBSD: ventel.c,v 1.14 2006/04/03 02:25:27 perry Exp $");
+__RCSID("$NetBSD: ventel.c,v 1.15 2006/12/14 14:18:04 christos Exp $");
#endif /* not lint */
/*
@@ -167,14 +167,11 @@ sigALRM(int dummy)
static int
gobble(char match, char response[])
{
- char *cp = response;
+ char * volatile cp;
sig_t f;
char c;
-#if __GNUC__ /* XXX pacify gcc */
- (void)&cp;
-#endif
-
+ cp = response;
f = signal(SIGALRM, sigALRM);
timeout = 0;
do {
diff --git a/usr.bin/tip/cmds.c b/usr.bin/tip/cmds.c
index 50a21b7feb3..957077fcd95 100644
--- a/usr.bin/tip/cmds.c
+++ b/usr.bin/tip/cmds.c
@@ -1,4 +1,4 @@
-/* $NetBSD: cmds.c,v 1.30 2006/10/22 16:46:49 christos Exp $ */
+/* $NetBSD: cmds.c,v 1.31 2006/12/14 14:18:03 christos Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)cmds.c 8.1 (Berkeley) 6/6/93";
#endif
-__RCSID("$NetBSD: cmds.c,v 1.30 2006/10/22 16:46:49 christos Exp $");
+__RCSID("$NetBSD: cmds.c,v 1.31 2006/12/14 14:18:03 christos Exp $");
#endif /* not lint */
#include "tip.h"
@@ -130,16 +130,13 @@ transfer(char *buf, int fd, const char *eofchars)
{
int ct;
char c, buffer[BUFSIZ];
- char *p = buffer;
+ char * volatile p;
int cnt, eof;
time_t start;
sig_t f;
char r;
-#if __GNUC__ /* XXX pacify gcc */
- (void)&p;
-#endif
-
+ p = buffer;
xpwrite(FD, buf, strlen(buf));
quit = 0;
write(attndes[1], "W", 1); /* Put TIPOUT into a wait state */
@@ -853,13 +850,14 @@ char *
expand(char aname[])
{
static char xname[BUFSIZ];
- char * volatile name = aname;
+ char * volatile name;
char cmdbuf[BUFSIZ];
int mypid, l;
char *cp;
const char *Shell;
int s, pivec[2];
+ name = aname;
if (!anyof(name, "~{[*?$`'\"\\"))
return(name);
if (pipe(pivec) < 0) {
diff --git a/usr.bin/tip/tip.c b/usr.bin/tip/tip.c
index cfbeb02dde2..ec1cf2a1eb3 100644
--- a/usr.bin/tip/tip.c
+++ b/usr.bin/tip/tip.c
@@ -1,4 +1,4 @@
-/* $NetBSD: tip.c,v 1.44 2006/11/29 14:46:27 jdc Exp $ */
+/* $NetBSD: tip.c,v 1.45 2006/12/14 14:18:03 christos Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -41,7 +41,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 1993\n\
#if 0
static char sccsid[] = "@(#)tip.c 8.1 (Berkeley) 6/6/93";
#endif
-__RCSID("$NetBSD: tip.c,v 1.44 2006/11/29 14:46:27 jdc Exp $");
+__RCSID("$NetBSD: tip.c,v 1.45 2006/12/14 14:18:03 christos Exp $");
#endif /* not lint */
/*
@@ -291,16 +291,12 @@ static jmp_buf promptbuf;
* normal erase and kill characters.
*/
int
-prompt(const char *s, char *p, size_t l)
+prompt(const char *s, char *volatile p, size_t l)
{
int c;
char *b = p;
sig_t oint, oquit;
-#if __GNUC__ /* XXX: pacify gcc */
- (void)&p;
-#endif
-
stoprompt = 0;
oint = signal(SIGINT, intprompt);
oquit = signal(SIGQUIT, SIG_IGN);