Date: Fri, 12 Oct 2012 14:18:17 GMT From: Erik Cederstrand <erik@cederstrand.dk> To: freebsd-gnats-submit@FreeBSD.org Subject: misc/172639: usr.bin/awk: mark FATAL() as __noreturn__ Message-ID: <201210121418.q9CEIHK7092611@red.freebsd.org> Resent-Message-ID: <201210121420.q9CEK0CE018430@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 172639 >Category: misc >Synopsis: usr.bin/awk: mark FATAL() as __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: Fri Oct 12 14:20:00 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Erik Cederstrand >Release: CURRENT >Organization: >Environment: >Description: This is similar to misc/172636. awk has a function FATAL() that unconditionally calls exit(). Mark it as such in the header prototype. >How-To-Repeat: >Fix: See patch Patch attached with submission follows: Index: head/contrib/one-true-awk/proto.h =================================================================== --- head/contrib/one-true-awk/proto.h (revision 241481) +++ head/contrib/one-true-awk/proto.h (working copy) @@ -132,7 +132,7 @@ extern void bracecheck(void); extern void bcheck2(int, int, int); extern void SYNTAX(const char *, ...); -extern void FATAL(const char *, ...); +extern void FATAL(const char *, ...) __attribute__ ((__noreturn__)); extern void WARNING(const char *, ...); extern void error(void); extern void eprint(void); >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210121418.q9CEIHK7092611>