From f8c2d2bde173c40f2f1780099df1099ba0bebbcb Mon Sep 17 00:00:00 2001 From: Philippe Charnier Date: Fri, 2 Nov 2007 18:06:51 +0000 Subject: initialize variables, WARNS=6 compliant --- usr.bin/tail/read.c | 2 +- usr.bin/tail/reverse.c | 1 + usr.bin/tail/tail.c | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) (limited to 'usr.bin/tail') diff --git a/usr.bin/tail/read.c b/usr.bin/tail/read.c index d04d158d47f6..272f1026bc9c 100644 --- a/usr.bin/tail/read.c +++ b/usr.bin/tail/read.c @@ -150,7 +150,7 @@ lines(FILE *fp, off_t off) if ((llines = malloc(off * sizeof(*llines))) == NULL) err(1, "malloc"); bzero(llines, off * sizeof(*llines)); - sp = NULL; + p = sp = NULL; blen = cnt = recno = wrap = 0; rc = 0; diff --git a/usr.bin/tail/reverse.c b/usr.bin/tail/reverse.c index f0a52aa8bcc5..462b39227f5f 100644 --- a/usr.bin/tail/reverse.c +++ b/usr.bin/tail/reverse.c @@ -197,6 +197,7 @@ r_buf(FILE *fp) char *p; off_t enomem; + tl = NULL; #define BSZ (128 * 1024) for (mark = NULL, enomem = 0;;) { /* diff --git a/usr.bin/tail/tail.c b/usr.bin/tail/tail.c index 2292c5fb8f21..d2f9df7cb523 100644 --- a/usr.bin/tail/tail.c +++ b/usr.bin/tail/tail.c @@ -114,6 +114,7 @@ main(int argc, char *argv[]) obsolete(argv); style = NOTSET; + off = 0; while ((ch = getopt(argc, argv, "Fb:c:fn:qr")) != -1) switch(ch) { case 'F': /* -F is superset of (and implies) -f */ -- cgit v1.2.3