diff options
author | joerg <joerg@FreeBSD.org> | 1995-03-19 13:29:28 +0000 |
---|---|---|
committer | joerg <joerg@FreeBSD.org> | 1995-03-19 13:29:28 +0000 |
commit | c6030c6511c69b69a216c893957b01bfc264d365 (patch) | |
tree | 163891f0a6f18e48e3d38e4d107ad82c2f5c570a /bin/ls | |
parent | 568f2efc88b72b511e26d42250ac4250a6610415 (diff) | |
download | FreeBSD-src-c6030c6511c69b69a216c893957b01bfc264d365.zip FreeBSD-src-c6030c6511c69b69a216c893957b01bfc264d365.tar.gz |
You will find enclosed some changes to make gcc -Wall more happy in
/usr/src/bin. Note that some patches are still needed in that directory.
I (Joerg) finished most of Philippe's cleanup. /bin/sh will still
need *allot* of work, however.
Submitted by: charnier@lirmm.fr (Philippe Charnier)
Diffstat (limited to 'bin/ls')
-rw-r--r-- | bin/ls/ls.c | 5 | ||||
-rw-r--r-- | bin/ls/print.c | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/bin/ls/ls.c b/bin/ls/ls.c index d2047c9..2d4922a 100644 --- a/bin/ls/ls.c +++ b/bin/ls/ls.c @@ -33,7 +33,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: ls.c,v 1.3 1994/09/24 02:55:54 davidg Exp $ + * $Id: ls.c,v 1.4 1994/12/18 19:00:01 joerg Exp $ */ #ifndef lint @@ -117,7 +117,7 @@ main(argc, argv) } else { f_singlecol = 1; /* retrieve environment variable, in case of explicit -C */ - if (p = getenv("COLUMNS")) + if ((p = getenv("COLUMNS"))) termwidth = atoi(p); } @@ -371,6 +371,7 @@ display(p, list) btotal = maxblock = maxinode = maxlen = maxnlink = 0; bcfile = 0; maxuser = maxgroup = maxflags = 0; + flags = NULL; maxsize = 0; for (cur = list, entries = 0; cur; cur = cur->fts_link) { if (cur->fts_info == FTS_ERR || cur->fts_info == FTS_NS) { diff --git a/bin/ls/print.c b/bin/ls/print.c index de889ca..83df587 100644 --- a/bin/ls/print.c +++ b/bin/ls/print.c @@ -33,7 +33,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: print.c,v 1.2 1994/09/24 02:55:56 davidg Exp $ */ #ifndef lint @@ -188,7 +188,7 @@ printcol(dp) dp->s_block); if ((base += numrows) >= num) break; - while ((cnt = (chcnt + TAB & ~(TAB - 1))) <= endcol) { + while ((cnt = ((chcnt + TAB) & ~(TAB - 1))) <= endcol){ (void)putchar('\t'); chcnt = cnt; } |