Date: Thu, 16 May 2013 18:27:26 GMT From: Fernando <fernando.apesteguia@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: bin/178692: [PATCH] [bin/pkill] use __dead2 over __attribute__((noreturn)) Message-ID: <201305161827.r4GIRQq8032774@oldred.FreeBSD.org> Resent-Message-ID: <201305161830.r4GIU18M073867@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 178692 >Category: bin >Synopsis: [PATCH] [bin/pkill] 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: >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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201305161827.r4GIRQq8032774>