From owner-freebsd-bugs@FreeBSD.ORG Tue Oct 23 10:30:01 2012 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 160E49F1 for ; Tue, 23 Oct 2012 10:30:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.FreeBSD.org [8.8.178.135]) by mx1.freebsd.org (Postfix) with ESMTP id C72FE8FC12 for ; Tue, 23 Oct 2012 10:30:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q9NAU0uu073999 for ; Tue, 23 Oct 2012 10:30:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q9NAU0DA073998; Tue, 23 Oct 2012 10:30:00 GMT (envelope-from gnats) Resent-Date: Tue, 23 Oct 2012 10:30:00 GMT Resent-Message-Id: <201210231030.q9NAU0DA073998@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Erik Cederstrand Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 974067A7 for ; Tue, 23 Oct 2012 10:21:59 +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 7F66D8FC0A for ; Tue, 23 Oct 2012 10:21:59 +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 q9NALxBl091417 for ; Tue, 23 Oct 2012 10:21:59 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.5/8.14.5/Submit) id q9NALxsC091416; Tue, 23 Oct 2012 10:21:59 GMT (envelope-from nobody) Message-Id: <201210231021.q9NALxsC091416@red.freebsd.org> Date: Tue, 23 Oct 2012 10:21:59 GMT From: Erik Cederstrand To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: misc/172978: dump: mark non-returning function quit() as such in function prototype X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Oct 2012 10:30:01 -0000 >Number: 172978 >Category: misc >Synopsis: dump: mark non-returning function quit() as such in function prototype >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: Tue Oct 23 10:30:00 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Erik Cederstrand >Release: CURRENT >Organization: >Environment: >Description: Marking non-returning function prototype for quit() in head/sbin/dump/dump.h eliminates various false positives in Clang Static Analyzer reports. >How-To-Repeat: >Fix: Use __noreturn__ to mark non-returning function. Patch attached with submission follows: Index: src/sbin/dump/dump.h =================================================================== --- src/sbin/dump/dump.h (revision 241876) +++ src/sbin/dump/dump.h (working copy) @@ -96,7 +96,7 @@ void msg(const char *fmt, ...) __printflike(1, 2); void msgtail(const char *fmt, ...) __printflike(1, 2); int query(const char *question); -void quit(const char *fmt, ...) __printflike(1, 2); +void quit(const char *fmt, ...) __printflike(1, 2) __attribute__((__noreturn__)); void timeest(void); time_t unctime(char *str); >Release-Note: >Audit-Trail: >Unformatted: