Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/fmt more casts to void



details:   https://anonhg.NetBSD.org/src/rev/50da859a3a3d
branches:  trunk
changeset: 586911:50da859a3a3d
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Jan 05 02:07:29 2006 +0000

description:
more casts to void

diffstat:

 usr.bin/fmt/fmt.c |  36 ++++++++++++++++++------------------
 1 files changed, 18 insertions(+), 18 deletions(-)

diffs (129 lines):

diff -r f523010ff32e -r 50da859a3a3d usr.bin/fmt/fmt.c
--- a/usr.bin/fmt/fmt.c Thu Jan 05 02:04:41 2006 +0000
+++ b/usr.bin/fmt/fmt.c Thu Jan 05 02:07:29 2006 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fmt.c,v 1.22 2006/01/04 20:44:57 christos Exp $        */
+/*     $NetBSD: fmt.c,v 1.23 2006/01/05 02:07:29 christos Exp $        */
 
 /*
  * Copyright (c) 1980, 1993
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = "@(#)fmt.c      8.1 (Berkeley) 7/20/93";
 #endif
-__RCSID("$NetBSD: fmt.c,v 1.22 2006/01/04 20:44:57 christos Exp $");
+__RCSID("$NetBSD: fmt.c,v 1.23 2006/01/05 02:07:29 christos Exp $");
 #endif /* not lint */
 
 #include <ctype.h>
@@ -103,7 +103,7 @@
        mark = ~0U;
 
        setprogname(*argv);
-       setlocale(LC_ALL, "");
+       (void)setlocale(LC_ALL, "");
 
        /*
         * LIZ@UOM 6/18/85 -- Check for goal and max length arguments 
@@ -139,7 +139,7 @@
                        continue;
                }
                fmt(fi);
-               fclose(fi);
+               (void)fclose(fi);
        }
        oflush();
        buf_end(&outbuf);
@@ -170,14 +170,14 @@
                        while (cp2 > cp && isspace((unsigned char)*cp2))
                                cp2--;
                        if (cp == cp2)
-                               putchar('\n');
+                               (void)putchar('\n');
                        col = cp2 - cp;
                        if (goal_length > col)
                                for (c = 0; c < (goal_length - col) / 2; c++)
-                                       putchar(' ');
+                                       (void)putchar(' ');
                        while (cp <= cp2)
-                               putchar(*cp++);
-                       putchar('\n');
+                               (void)putchar(*cp++);
+                       (void)putchar('\n');
                }
        }
 
@@ -193,7 +193,7 @@
                buf_reset(&lbuf);
                while (c != '\n' && c != EOF) {
                        if (c == '\b') {
-                               buf_unputc(&lbuf);
+                               (void)buf_unputc(&lbuf);
                                c = getc(fi);
                                continue;
                        }
@@ -205,7 +205,7 @@
                        c = getc(fi);
                }
                buf_putc(&lbuf, '\0');
-               buf_unputc(&lbuf);
+               (void)buf_unputc(&lbuf);
                add_space = c != EOF;
 
                /*
@@ -233,7 +233,7 @@
                        continue;
                cbuf.ptr = cp2 + 1;
                buf_putc(&cbuf, '\0');
-               buf_unputc(&cbuf);
+               (void)buf_unputc(&cbuf);
                prefix(&cbuf, add_space);
                if (c != EOF)
                        c = getc(fi);
@@ -259,7 +259,7 @@
 
        if (buf->ptr == buf->bptr) {
                oflush();
-               putchar('\n');
+               (void)putchar('\n');
                return;
        }
        for (cp = buf->bptr; *cp == ' '; cp++)
@@ -337,7 +337,7 @@
                        buf_putc(&word, *cp++);
 
                buf_putc(&word, '\0');
-               buf_unputc(&word);
+               (void)buf_unputc(&word);
 
                pack(word.bptr, wlen);
        }
@@ -409,7 +409,7 @@
        if (outbuf.bptr == outbuf.ptr)
                return;
        buf_putc(&outbuf, '\0');
-       buf_unputc(&outbuf);
+       (void)buf_unputc(&outbuf);
        tabulate(&outbuf);
        buf_reset(&outbuf);
 }
@@ -441,15 +441,15 @@
        b = b % 8;
        if (t > 0)
                do
-                       putchar('\t');
+                       (void)putchar('\t');
                while (--t);
        if (b > 0)
                do
-                       putchar(' ');
+                       (void)putchar(' ');
                while (--b);
        while (*cp)
-               putchar(*cp++);
-       putchar('\n');
+               (void)putchar(*cp++);
+       (void)putchar('\n');
 }
 
 /*



Home | Main Index | Thread Index | Old Index