bin/177076: [PATCH] Small correction in cat's usage() function

Fernando fernando.apesteguia at gmail.com
Mon Mar 18 17:40:00 UTC 2013


>Number:         177076
>Category:       bin
>Synopsis:       [PATCH] Small correction in cat's usage() function
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Mar 18 17:40:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Fernando
>Release:        9.0-RELEASE
>Organization:
OpenSistemas
>Environment:
FreeBSD beastie 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan  3 07:46:30 UTC 2012     root at farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64

>Description:
Two small corrections for bin/cat.

* Add the __dead2 attribute since it is a function that never returns

* Add an empty line in usage() according to style(9)
>How-To-Repeat:

>Fix:
Apply the attached patch

Patch attached with submission follows:

--- /usr/src/bin/cat/cat.c	2012-01-03 04:26:15.000000000 +0100
+++ cat.c	2013-03-18 18:31:38.000000000 +0100
@@ -68,7 +68,7 @@
 int rval;
 const char *filename;
 
-static void usage(void);
+static void usage(void) __dead2;
 static void scanfiles(char *argv[], int cooked);
 static void cook_cat(FILE *);
 static void raw_cat(int);
@@ -136,6 +136,7 @@
 static void
 usage(void)
 {
+
 	fprintf(stderr, "usage: cat [-benstuv] [file ...]\n");
 	exit(1);
 	/* NOTREACHED */


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list