public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
From: Andrew Burgess <aburgess@sourceware.org>
To: gdb-cvs@sourceware.org
Subject: [binutils-gdb] sim/ppc: mark device_error function as ATTRIBUTE_NORETURN
Date: Wed, 19 Oct 2022 13:32:58 +0000 (GMT)	[thread overview]
Message-ID: <20221019133258.2294D3858295@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=e5961d2be503149aaa40927c0a9501c06ca980e5

commit e5961d2be503149aaa40927c0a9501c06ca980e5
Author: Andrew Burgess <aburgess@redhat.com>
Date:   Wed Oct 12 11:14:26 2022 +0100

    sim/ppc: mark device_error function as ATTRIBUTE_NORETURN
    
    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.
    
    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;
 
 INLINE_DEVICE\
 (int) device_trace

                 reply	other threads:[~2022-10-19 13:32 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221019133258.2294D3858295@sourceware.org \
    --to=aburgess@sourceware.org \
    --cc=gdb-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).