From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1726) id 2294D3858295; Wed, 19 Oct 2022 13:32:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2294D3858295 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666186378; bh=rZmxBzCBWmNhAIV7QcNhcSCkJfnWmEDSp8ig37W6yjI=; h=From:To:Subject:Date:From; b=kWzPo+1TjlKfe0FZlQjYowO+fTWKGgUHJvT/EsiBsj5iwcxafu8gx4lX1k53SupmD jcfCRIpDVXhDOYICXFWiOK7BZG+V+lYHFY3+C1cYY0VTJ//Kk/9aQ345ziGCDj94BU mCpCWL793bgw5MLmE88CA+3KV3sEQGkkb3W/ux8g= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Andrew Burgess To: gdb-cvs@sourceware.org Subject: [binutils-gdb] sim/ppc: mark device_error function as ATTRIBUTE_NORETURN X-Act-Checkin: binutils-gdb X-Git-Author: Andrew Burgess X-Git-Refname: refs/heads/master X-Git-Oldrev: 744875dfdc94dc397ae666c65c56b416c3a191db X-Git-Newrev: e5961d2be503149aaa40927c0a9501c06ca980e5 Message-Id: <20221019133258.2294D3858295@sourceware.org> Date: Wed, 19 Oct 2022 13:32:58 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3De5961d2be503= 149aaa40927c0a9501c06ca980e5 commit e5961d2be503149aaa40927c0a9501c06ca980e5 Author: Andrew Burgess Date: Wed Oct 12 11:14:26 2022 +0100 sim/ppc: mark device_error function as ATTRIBUTE_NORETURN =20 The device_error function always ends up calling the error function, which is itself marked as ATTRIBUTE_NORETURN, so it makes sense that device_error should also be marked ATTRIBUTE_NORETURN. =20 Doing this resolves a few warnings from hw_ide.c about possibly uninitialized variables - the variables are only uninitialized after passing through a call to device_error, which obviously means the variables are never really used uninitialized, the simulation will terminate with the device_error call. Diff: --- sim/ppc/device.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sim/ppc/device.h b/sim/ppc/device.h index bd539095160..65c85e4ddd3 100644 --- a/sim/ppc/device.h +++ b/sim/ppc/device.h @@ -729,7 +729,7 @@ EXTERN_DEVICE\ (void) device_error (device *me, const char *fmt, - ...) ATTRIBUTE_PRINTF_2; + ...) ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF_2; =20 INLINE_DEVICE\ (int) device_trace