From nobody@FreeBSD.org  Thu May 16 18:27:26 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	by hub.freebsd.org (Postfix) with ESMTP id B33CE30F
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 16 May 2013 18:27:26 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from oldred.FreeBSD.org (oldred.freebsd.org [8.8.178.121])
	by mx1.freebsd.org (Postfix) with ESMTP id A5AE09A3
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 16 May 2013 18:27:26 +0000 (UTC)
Received: from oldred.FreeBSD.org ([127.0.1.6])
	by oldred.FreeBSD.org (8.14.5/8.14.5) with ESMTP id r4GIRQMs032775
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 16 May 2013 18:27:26 GMT
	(envelope-from nobody@oldred.FreeBSD.org)
Received: (from nobody@localhost)
	by oldred.FreeBSD.org (8.14.5/8.14.5/Submit) id r4GIRQq8032774;
	Thu, 16 May 2013 18:27:26 GMT
	(envelope-from nobody)
Message-Id: <201305161827.r4GIRQq8032774@oldred.FreeBSD.org>
Date: Thu, 16 May 2013 18:27:26 GMT
From: Fernando <fernando.apesteguia@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [PATCH] [bin/pkill] use __dead2 over __attribute__((noreturn))
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         178692
>Category:       bin
>Synopsis:       [PATCH] pkill(1): use __dead2 over __attribute__((noreturn))
>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:   Thu May 16 18:30:01 UTC 2013
>Closed-Date:    
>Last-Modified:  Fri May 17 08:10:38 UTC 2013
>Originator:     Fernando
>Release:        9.0-RELEASE
>Organization:
Open Sistemas
>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:
pkill uses __attribute__((noreturn)) in the usage function.
__dead2 should be used since it is properly defined in sys/cdefs.h depending on the case.

See this[1] for relevant information

[1] http://permalink.gmane.org/gmane.os.freebsd.devel.cvs.src/164488
>How-To-Repeat:

>Fix:
Apply the attached patch.

Patch attached with submission follows:

diff -ruN /usr/src/bin/pkill/pkill.c bin/pkill/pkill.c
--- /usr/src/bin/pkill/pkill.c	2012-01-03 04:26:16.000000000 +0100
+++ bin/pkill/pkill.c	2013-05-16 20:22:38.000000000 +0200
@@ -117,7 +117,7 @@
 static struct listhead sidlist = SLIST_HEAD_INITIALIZER(sidlist);
 static struct listhead jidlist = SLIST_HEAD_INITIALIZER(jidlist);
 
-static void	usage(void) __attribute__((__noreturn__));
+static void	usage(void) __dead2;
 static int	killact(const struct kinfo_proc *);
 static int	grepact(const struct kinfo_proc *);
 static void	makelist(struct listhead *, enum listtype, char *);


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