From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 6HgwFGy1RmMXYQoAWB0awg (envelope-from ) for ; Wed, 12 Oct 2022 08:39:08 -0400 Received: by simark.ca (Postfix, from userid 112) id 4F6971E112; Wed, 12 Oct 2022 08:39:08 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=bB3RhQ7L; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id E59241E0D3 for ; Wed, 12 Oct 2022 08:39:07 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 971203821FE4 for ; Wed, 12 Oct 2022 12:39:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 971203821FE4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1665578347; bh=sTRYf+M+idvh13rWaikTDBfuopqTIbgjbMpTqijwZuM=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=bB3RhQ7LkwOKlK+qUqA0bXwEP5WZdkygfl0eSaUOOCmVClZGKXedb+UzXRFMMhG9z bQMxsE5rcBis8emju9Lid6P65KRi/MIGS9qti4KjKQZ/vVff97UOxJ2B+8owAytYje /4gQYgPuLYvaMyfYdG2KWPfy7HlPODnZYX4r+xBc= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 468173851163 for ; Wed, 12 Oct 2022 12:38:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 468173851163 Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-375-npF8kTeNMNa5-5Z8UXQQBA-1; Wed, 12 Oct 2022 08:38:45 -0400 X-MC-Unique: npF8kTeNMNa5-5Z8UXQQBA-1 Received: by mail-wm1-f71.google.com with SMTP id 2-20020a05600c268200b003c4290989e1so438519wmt.2 for ; Wed, 12 Oct 2022 05:38:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sTRYf+M+idvh13rWaikTDBfuopqTIbgjbMpTqijwZuM=; b=sV3Q+fRQFOyshRzxOAII8ubE3Xir0j9/8VPTNqGTXd9+VLQquZzEWUXFCTaa3oU4as UwIxjSio6umYGuzbOGGqurosgFA0qDzZykQ+Fu39sHUb6Th1oAdJ4kOBoQgeJxiGhRla E+U24LyLYIDeEvyvxxguT8JmqTP+esat8THeMisHy19/xR+TGWMlLu1Amg4CaXa3MQzY kkaKoXj005XYQFP8A/Gh9D7pF0XCOsALk/AkRaQT+etR6pFEmDWImfAZ7FtKWubMDizb oQHEm+ynl1vW3jp2rSbI0kiH/sB2IZt6wj2JQPf1DrRWnpYAgDlyX+tCXq/fRfEg6+lN RybQ== X-Gm-Message-State: ACrzQf3g2QLJ3rcz4LORtZOFfg2Usogn1yMwoyVdar0qHLXDnpRjmdnJ eSB54L7Uh1aNJQ+4WsZp0dQcjfxGkN79h1ne/W6KgYbqGQlnApwhG+w1gBNAAZne2ErBL6uoc9Y frynG+1CZ6d162IKphl9wk3sVWqBefrx+p0x+7Edm9/rFHgZHwK7OmhLJ6P9HeKh9bia90gjRHg == X-Received: by 2002:a05:6000:3cf:b0:231:6ed6:e978 with SMTP id b15-20020a05600003cf00b002316ed6e978mr5065642wrg.500.1665578323908; Wed, 12 Oct 2022 05:38:43 -0700 (PDT) X-Google-Smtp-Source: AMsMyM62d9kjPL0aF3VVGOJjo79R57eIVm/QFs3DBusTRW4wpV+SokLuMnJc1B38xaMuBRoDcOi7yw== X-Received: by 2002:a05:6000:3cf:b0:231:6ed6:e978 with SMTP id b15-20020a05600003cf00b002316ed6e978mr5065627wrg.500.1665578323659; Wed, 12 Oct 2022 05:38:43 -0700 (PDT) Received: from localhost (52.72.115.87.dyn.plus.net. [87.115.72.52]) by smtp.gmail.com with ESMTPSA id f7-20020a05600c154700b003a3442f1229sm1831393wmg.29.2022.10.12.05.38.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Oct 2022 05:38:43 -0700 (PDT) To: gdb-patches@sourceware.org Subject: [PATCH 3/5] sim/ppc: mark device_error function as ATTRIBUTE_NORETURN Date: Wed, 12 Oct 2022 13:38:33 +0100 Message-Id: <39eeb655ef7a1a8b3ea3c2f120e7d67693ec3f93.1665578246.git.aburgess@redhat.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: References: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Andrew Burgess via Gdb-patches Reply-To: Andrew Burgess Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" 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. --- 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 -- 2.25.4