From owner-freebsd-bugs@FreeBSD.ORG Tue Oct 23 10:20: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 507F063E for ; Tue, 23 Oct 2012 10:20: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 0F0CC8FC18 for ; Tue, 23 Oct 2012 10:20:01 +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 q9NAK0VZ073816 for ; Tue, 23 Oct 2012 10:20:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q9NAK0UB073815; Tue, 23 Oct 2012 10:20:00 GMT (envelope-from gnats) Resent-Date: Tue, 23 Oct 2012 10:20:00 GMT Resent-Message-Id: <201210231020.q9NAK0UB073815@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 7331C62C for ; Tue, 23 Oct 2012 10:19:36 +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 5BD8B8FC08 for ; Tue, 23 Oct 2012 10:19:36 +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 q9NAJZcH090561 for ; Tue, 23 Oct 2012 10:19:35 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.5/8.14.5/Submit) id q9NAJZne090557; Tue, 23 Oct 2012 10:19:35 GMT (envelope-from nobody) Message-Id: <201210231019.q9NAJZne090557@red.freebsd.org> Date: Tue, 23 Oct 2012 10:19:35 GMT From: Erik Cederstrand To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: misc/172977: aic7xxx: Mark stop() function as noreturn 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:20:01 -0000 >Number: 172977 >Category: misc >Synopsis: aic7xxx: Mark stop() function 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: Tue Oct 23 10:20:00 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Erik Cederstrand >Release: CURRENT >Organization: >Environment: >Description: The stop() function prototype in head/sys/dev/aic7xxx/aicasm/aicasm.h does not hint that the implementation of the function unconditionally calls exit(). This causes false positive Clang Static Analyzer reports. >How-To-Repeat: >Fix: Add __attribute__ ((__noreturn__)) to the declaration. Patch attached with submission follows: Index: head/sys/dev/aic7xxx/aicasm/aicasm.h =================================================================== --- head/sys/dev/aic7xxx/aicasm/aicasm.h (revision 241876) +++ head/sys/dev/aic7xxx/aicasm/aicasm.h (working copy) @@ -82,7 +82,7 @@ extern int dst_mode; struct symbol; -void stop(const char *errstring, int err_code); +void stop(const char *errstring, int err_code) __attribute__ ((__noreturn__)); void include_file(char *file_name, include_type type); void expand_macro(struct symbol *macro_symbol); struct instruction *seq_alloc(void); >Release-Note: >Audit-Trail: >Unformatted: