From nobody@FreeBSD.org  Mon Mar 18 17:37:09 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115])
	by hub.freebsd.org (Postfix) with ESMTP id 2C55F41F
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 18 Mar 2013 17:37:09 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 101FBC37
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 18 Mar 2013 17:37:09 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.5/8.14.5) with ESMTP id r2IHb8v7015638
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 18 Mar 2013 17:37:08 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.5/8.14.5/Submit) id r2IHb8vY015637;
	Mon, 18 Mar 2013 17:37:08 GMT
	(envelope-from nobody)
Message-Id: <201303181737.r2IHb8vY015637@red.freebsd.org>
Date: Mon, 18 Mar 2013 17:37:08 GMT
From: Fernando <fernando.apesteguia@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [PATCH] Small correction in cat's usage() function
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         177076
>Category:       bin
>Synopsis:       [PATCH] Small correction in cat's usage() function
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    eadler
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Mar 18 17:40:00 UTC 2013
>Closed-Date:    Tue Apr 30 02:08:07 UTC 2013
>Last-Modified:  Tue Apr 30 15:40:00 UTC 2013
>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@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:
Responsible-Changed-From-To: freebsd-bugs->eadler 
Responsible-Changed-By: eadler 
Responsible-Changed-When: Tue Mar 19 01:35:49 UTC 2013 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=177076 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/177076: commit references a PR
Date: Tue, 23 Apr 2013 13:04:20 +0000 (UTC)

 Author: eadler
 Date: Tue Apr 23 13:03:11 2013
 New Revision: 249804
 URL: http://svnweb.freebsd.org/changeset/base/249804
 
 Log:
   - Add the __dead2 attribute since it is a function that never returns
   - Add an empty line in usage() according to style(9)
   
   PR:		bin/177076
   Submitted by:	Fernando <fernando.apesteguia@gmail.com>
   Approved by:	cperciva (mentor)
 
 Modified:
   head/bin/cat/cat.c
 
 Modified: head/bin/cat/cat.c
 ==============================================================================
 --- head/bin/cat/cat.c	Tue Apr 23 13:03:08 2013	(r249803)
 +++ head/bin/cat/cat.c	Tue Apr 23 13:03:11 2013	(r249804)
 @@ -68,7 +68,7 @@ static int bflag, eflag, lflag, nflag, s
  static int rval;
  static 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);
 @@ -153,6 +153,7 @@ main(int argc, char *argv[])
  static void
  usage(void)
  {
 +
  	fprintf(stderr, "usage: cat [-belnstuv] [file ...]\n");
  	exit(1);
  	/* NOTREACHED */
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->patched 
State-Changed-By: eadler 
State-Changed-When: Tue Apr 23 13:23:59 UTC 2013 
State-Changed-Why:  
committed 

http://www.freebsd.org/cgi/query-pr.cgi?pr=177076 
State-Changed-From-To: patched->closed 
State-Changed-By: eadler 
State-Changed-When: Tue Apr 30 02:08:06 UTC 2013 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=177076 

From: =?ISO-8859-1?Q?Fernando_Apestegu=EDa?= <fernando.apesteguia@gmail.com>
To: bug-followup@FreeBSD.org, fernando.apesteguia@gmail.com
Cc:  
Subject: Re: bin/177076: [PATCH] Small correction in cat&#39;s usage() function
Date: Tue, 30 Apr 2013 17:32:48 +0200

 --047d7beb986eada78504db95b66f
 Content-Type: text/plain; charset=ISO-8859-1
 
 I've identified the same issue in several other similar functions under
 bin, sbin, usr.bin and usr.sbin.
 
 Would you like me to send more patches like this one?
 
 Cheers.
 
 --047d7beb986eada78504db95b66f
 Content-Type: text/html; charset=ISO-8859-1
 
 I&#39;ve identified the same issue in several other similar functions under bin, sbin, usr.bin and usr.sbin.<br><br>Would you like me to send more patches like this one?<br><br>Cheers.<br>
 
 --047d7beb986eada78504db95b66f--
>Unformatted:
