From patchwork Fri Nov 4 11:01:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Burgess X-Patchwork-Id: 15472 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp322026wru; Fri, 4 Nov 2022 04:02:01 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7kuVfxi0ruMWWCefV34F9FQTIqncX94jBJkvoM19v82/U0mbm2vJSXqal86df2gib9DkGI X-Received: by 2002:a17:907:783:b0:76e:f290:8b5 with SMTP id xd3-20020a170907078300b0076ef29008b5mr34301619ejb.395.1667559721616; Fri, 04 Nov 2022 04:02:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667559721; cv=none; d=google.com; s=arc-20160816; b=i+kuf6b7mUe2y4nXKCZcQf/SkJue5ERiltl6OOvBCNw1wehEJBBM+MVSeZc4+SY7Id MZLVlgyruF/E+8u003TdAlxezajLXkn0DVrM6FUZljhvheR2JBVX3gqsUyw8Bgg3Q8KY cG58zBFPCmua0QyRaN0cXNQB8kIvLQr2hxBlt62Q3Jl0y1koMDN9oCu8mjRfw8mYi5+S Amm5aVWMXHGHokMJnmESmS3yMBoXjXmnIiFcI1u4Lg5cXpwVPHNsbVO3FC5YcTqQIU9F hHY2dQujWI37S2JOFiu6Ldw1x9BF793cf4A0XRB4WLR0BogI+7IdtBnH9S8PjegBYg7N nxBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:dmarc-filter:delivered-to:dkim-signature :dkim-filter; bh=9KL44fU1j5QgPO61VSF9huAjMEg2agb+9B94aXza3lI=; b=Q+jFmdymQPxuLfd53ixC4X6ipfZTxxriIcAPxdCdgoBjSZdl4IK/1bs/pJK33Csz00 3LRLYOmTi6cbrxVLfva0JO6XcB87WQ5OqUkOpQkEdwmLJS2qpDch0ebHpiCVU4a3Rgqr wqTLUwwCa8xo3Bh+Vr96SBSPjqkVfCITnuWqUpiRFfpVyq4m4aDLKWapNYTpZu9n+SEw YqVGu9Md9bffCIEMHJXztR0LRHgeQdegmT5jDwkkFpmE6hdhXOoJ4b/oqycoqIucQ15c NiARsrV1wxrRoh4M5C7+18K9gqFOiBsWbuDl/yMiTTHdzAb9JKtjx4dUCp5QL7Sc8/gG foPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=SZQ1UBwc; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id z10-20020a170906714a00b007ac60b82ea5si3707125ejj.96.2022.11.04.04.02.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Nov 2022 04:02:01 -0700 (PDT) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=SZQ1UBwc; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5F7BB385828C for ; Fri, 4 Nov 2022 11:02:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5F7BB385828C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667559720; bh=9KL44fU1j5QgPO61VSF9huAjMEg2agb+9B94aXza3lI=; 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=SZQ1UBwcgCeLpSPkA8eEO1qZDRaf+nZWTZwQuHWpgNKc0EyCizxHuSohMCwwUk9L2 Fp7DI8NcLLUeWStDS5ltjIVfgV7Pm4lmzVscxNd8FJ+PN8bbwh9K7p1QYcqXDPUVVr biKU2dFLc2874h3R5NuN01+D9w9G6IZA8acDCy5M= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 174F6385800E for ; Fri, 4 Nov 2022 11:01:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 174F6385800E Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-596-y_mjG-lmOM-3PpifT2f-KQ-1; Fri, 04 Nov 2022 07:01:37 -0400 X-MC-Unique: y_mjG-lmOM-3PpifT2f-KQ-1 Received: by mail-wm1-f72.google.com with SMTP id ay40-20020a05600c1e2800b003cf8aa16377so2124741wmb.7 for ; Fri, 04 Nov 2022 04:01:37 -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=9KL44fU1j5QgPO61VSF9huAjMEg2agb+9B94aXza3lI=; b=dFfTaBa2y2ZlR8teBJJfmKkz2YlSaJhgvAKfY18lrSLFHlIEf1rNrZGS/YODnVzyJ3 DVmtJT+soi9Df532z/1IGVEGPC/9L2wk8dQxUjfb1cS7el8P5pX8lOSqAuCowmEhFVR9 0kuKPX+edcZg3F5VytD596XIIiGaGgFsJsBnc940d7Ed9kE8Yf8A90eBDNcLbslEfG+3 KnH/R05J085YWA6sCL5jbOwHHYu3wHrIz83WflmkpUOBk7esftokyalbybqxNLtxalDS 0ZxxufC02hxqi9JDiOefoIlAiv/nMwqKl6JRRF35ECnk89juxH7Ry+fZG7DVTDbHm9na o97w== X-Gm-Message-State: ACrzQf1e1A00aYPTjW5tEg/VdBNgjE2eHFvNXaPv3rv5D//hiQdho30T RZIiwF3uFjJvih1xa34JHqxVBbkphlyf2bpIxal90ZOo558oks5VECPdXBMDbPMjouNBPYirOYm Vxa9wcUS/piGnUKKxXs8iIK0ZBxl22lmAD0MzvqblErTEpE+AYK4XLyHoADEKZ3tzuogwYg== X-Received: by 2002:a5d:4351:0:b0:236:c820:97b8 with SMTP id u17-20020a5d4351000000b00236c82097b8mr18192133wrr.699.1667559695917; Fri, 04 Nov 2022 04:01:35 -0700 (PDT) X-Received: by 2002:a5d:4351:0:b0:236:c820:97b8 with SMTP id u17-20020a5d4351000000b00236c82097b8mr18192116wrr.699.1667559695664; Fri, 04 Nov 2022 04:01:35 -0700 (PDT) Received: from localhost ([31.111.84.238]) by smtp.gmail.com with ESMTPSA id l41-20020a05600c08a900b003b4935f04a4sm2969323wmp.5.2022.11.04.04.01.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Nov 2022 04:01:35 -0700 (PDT) To: binutils@sourceware.org Subject: [PUSHED] opcodes/arm: silence compiler warning about uninitialized variable use Date: Fri, 4 Nov 2022 11:01:32 +0000 Message-Id: <20221104110132.694984-1-aburgess@redhat.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20221101111802.1532080-1-aburgess@redhat.com> References: <20221101111802.1532080-1-aburgess@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Andrew Burgess via Binutils From: Andrew Burgess Reply-To: Andrew Burgess Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748563103031258688?= X-GMAIL-MSGID: =?utf-8?q?1748563103031258688?= *sigh* Off-list, I was pointed at yet another uninitialized variable problem caused by my disassembler styling patch. This one is the same as the first fix I pushed, just in another function. Hopefully /this/ will be the last fix I end up pushing. Thanks for your continued patience, Andrew --- After this commit: commit 6576bffe6cbbb53c5756b2fccd2593ba69b74cdf Date: Thu Jul 7 13:43:45 2022 +0100 opcodes/arm: add disassembler styling for arm Some people were seeing their builds failing with complaints about a possible uninitialized variable usage. I previously fixed an instance of this issue in this commit: commit 2df82cd4b459fbc32120e0ad1ce19e26349506fe Date: Tue Nov 1 10:36:59 2022 +0000 opcodes/arm: silence compiler warning about uninitialized variable use which did fix the build problems that the sourceware buildbot was hitting, however, an additional instance of the same problem was brought to my attention, and that is fixed in this commit. Where commit 2df82cd4b4 fixed the uninitialized variable problem in print_mve_unpredictable, this commit fixes the same problem in print_mve_undefined. As with the previous commit, I don't believe we could really ever get an uninitialized variable usage, based on the current usage of the function, so I have just initialized the reason variable to "??". --- opcodes/arm-dis.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/opcodes/arm-dis.c b/opcodes/arm-dis.c index 31ed81f5a4e..47a0a38adec 100644 --- a/opcodes/arm-dis.c +++ b/opcodes/arm-dis.c @@ -7148,7 +7148,9 @@ print_mve_undefined (struct disassemble_info *info, { void *stream = info->stream; fprintf_styled_ftype func = info->fprintf_styled_func; - const char *reason; + /* Initialize REASON to avoid compiler warning about uninitialized + usage, though such usage should be impossible. */ + const char *reason = "??"; switch (undefined_code) {