summaryrefslogtreecommitdiffstats
path: root/usr.bin/msgs
diff options
context:
space:
mode:
authorkris <kris@FreeBSD.org>2001-05-26 21:49:29 +0000
committerkris <kris@FreeBSD.org>2001-05-26 21:49:29 +0000
commitfa1f42013f23f735897974aaf3221003cb928a84 (patch)
tree1b7ebb5101006a0a4d3797c0b1059e8e3d26ab57 /usr.bin/msgs
parenta942467a46f6ef1d216a886dd81d9272213bdea2 (diff)
downloadFreeBSD-src-fa1f42013f23f735897974aaf3221003cb928a84.zip
FreeBSD-src-fa1f42013f23f735897974aaf3221003cb928a84.tar.gz
Fix WARNS=2 warnings on alpha and i386 and clamp it down
Diffstat (limited to 'usr.bin/msgs')
-rw-r--r--usr.bin/msgs/Makefile1
-rw-r--r--usr.bin/msgs/msgs.c87
2 files changed, 45 insertions, 43 deletions
diff --git a/usr.bin/msgs/Makefile b/usr.bin/msgs/Makefile
index 21cb151..fd0b0e8 100644
--- a/usr.bin/msgs/Makefile
+++ b/usr.bin/msgs/Makefile
@@ -2,6 +2,7 @@
# $FreeBSD$
PROG= msgs
+WARNS?= 2
DPADD= ${LIBTERMCAP}
LDADD= -ltermcap
diff --git a/usr.bin/msgs/msgs.c b/usr.bin/msgs/msgs.c
index e1db2fc..e576edb 100644
--- a/usr.bin/msgs/msgs.c
+++ b/usr.bin/msgs/msgs.c
@@ -108,36 +108,36 @@ static const char rcsid[] =
typedef char bool;
-FILE *msgsrc;
-FILE *newmsg;
-char *sep = "-";
-char inbuf[BUFSIZ];
-char fname[MAXPATHLEN];
-char cmdbuf[MAXPATHLEN + MAXPATHLEN];
-char subj[128];
-char from[128];
-char date[128];
-char *ptr;
-char *in;
-bool local;
-bool ruptible;
-bool totty;
-bool seenfrom;
-bool seensubj;
-bool blankline;
-bool printing = NO;
-bool mailing = NO;
-bool quitit = NO;
-bool sending = NO;
-bool intrpflg = NO;
-int uid;
-int msg;
-int prevmsg;
-int lct;
-int nlines;
-int Lpp = 0;
-time_t t;
-time_t keep;
+FILE *msgsrc;
+FILE *newmsg;
+const char *sep = "-";
+char inbuf[BUFSIZ];
+char fname[MAXPATHLEN];
+char cmdbuf[MAXPATHLEN + MAXPATHLEN];
+char subj[128];
+char from[128];
+char date[128];
+char *ptr;
+char *in;
+bool local;
+bool ruptible;
+bool totty;
+bool seenfrom;
+bool seensubj;
+bool blankline;
+bool printing = NO;
+bool mailing = NO;
+bool quitit = NO;
+bool sending = NO;
+bool intrpflg = NO;
+int uid;
+int msg;
+int prevmsg;
+int lct;
+int nlines;
+int Lpp = 0;
+time_t t;
+time_t keep;
/* option initialization */
bool hdrs = NO;
@@ -151,15 +151,16 @@ bool lastcmd = NO;
jmp_buf tstpbuf;
-void ask __P((char *));
-void gfrsub __P((FILE *));
-int linecnt __P((FILE *));
-int next __P((char *));
-char *nxtfld __P((unsigned char *));
-void onsusp __P((int));
-void onintr __P((int));
-void prmesg __P((int));
-static void usage __P((void));
+void ask __P((const char *));
+void gfrsub __P((FILE *));
+int linecnt __P((FILE *));
+int main __P((int, char *[]));
+int next __P((char *));
+char *nxtfld __P((unsigned char *));
+void onsusp __P((int));
+void onintr __P((int));
+void prmesg __P((int));
+static void usage __P((void));
int
main(argc, argv)
@@ -449,7 +450,7 @@ int argc; char *argv[];
Lpp = win.ws_row;
if (Lpp <= 0) {
if (tgetent(inbuf, getenv("TERM")) <= 0
- || (Lpp = tgetnum("li")) <= 0) {
+ || (Lpp = tgetnum(__DECONST(char *, "li"))) <= 0) {
Lpp = NLINES;
}
}
@@ -671,7 +672,7 @@ int length;
void
onintr(unused)
- int unused;
+ int unused __unused;
{
signal(SIGINT, onintr);
if (mailing)
@@ -697,7 +698,7 @@ onintr(unused)
*/
void
onsusp(unused)
- int unused;
+ int unused __unused;
{
signal(SIGTSTP, SIG_DFL);
sigsetmask(0);
@@ -734,7 +735,7 @@ char *buf;
void
ask(prompt)
-char *prompt;
+const char *prompt;
{
char inch;
int n, cmsg, fd;
OpenPOWER on IntegriCloud