From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 948 invoked by alias); 9 Jan 2011 02:14:32 -0000 Received: (qmail 939 invoked by uid 22791); 9 Jan 2011 02:14:31 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp.gentoo.org (HELO smtp.gentoo.org) (140.211.166.183) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 09 Jan 2011 02:14:25 +0000 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id F0B551B401C; Sun, 9 Jan 2011 02:14:22 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org Cc: toolchain-devel@blackfin.uclinux.org Subject: [PATCH] sim: add noreturn markings to more hw abort/halt funcs Date: Sun, 09 Jan 2011 02:14:00 -0000 Message-Id: <1294539266-12692-1-git-send-email-vapier@gentoo.org> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-01/txt/msg00171.txt.bz2 These functions either call abort() themselves, or call functions which are already marked noreturn. Either way, they don't return, so mark them as such so calling code can assume this. This fixes some uninitialized warnings due to code paths that end in an abort function. Signed-off-by: Mike Frysinger 2010-01-08 Mike Frysinger * hw-device.h (hw_abort, hw_vabort, hw_halt): Add noreturn attribute. * sim-hw.h (sim_hw_abort): Likewise. --- sim/common/hw-device.h | 6 +++--- sim/common/sim-hw.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sim/common/hw-device.h b/sim/common/hw-device.h index 4ac61b1..b0f66eb 100644 --- a/sim/common/hw-device.h +++ b/sim/common/hw-device.h @@ -433,17 +433,17 @@ int hw_ioctl void hw_abort (struct hw *me, const char *fmt, - ...) __attribute__ ((format (printf, 2, 3))); + ...) __attribute__ ((format (printf, 2, 3), noreturn)); void hw_vabort (struct hw *me, const char *fmt, - va_list ap); + va_list ap) __attribute__ ((noreturn)); void hw_halt (struct hw *me, int reason, - int status); + int status) __attribute__ ((noreturn)); #define hw_trace_p(hw) ((hw)->trace_of_hw_p + 0) diff --git a/sim/common/sim-hw.h b/sim/common/sim-hw.h index 1e0d3b3..e85cecc 100644 --- a/sim/common/sim-hw.h +++ b/sim/common/sim-hw.h @@ -49,7 +49,7 @@ void sim_hw_abort (SIM_DESC sd, struct hw *hw, const char *fmt, - ...) __attribute__ ((format (printf, 3, 4))); + ...) __attribute__ ((format (printf, 3, 4), noreturn)); -- 1.7.3.1