From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667559707; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9KL44fU1j5QgPO61VSF9huAjMEg2agb+9B94aXza3lI=; b=WOr0YE/I7N60Bfzipzt0pM3QLEboWg+03qSt+W7bwHPm61450DnjWEjsaeDZAjjf1h1aQa oLRYgus50M70e+zRF0cruis9sm11XSCM8xgeUyPI2h2tMAdG9YuHCK3m+WN7XTa9iyXrL1 9neK5Q2bNZsxi6BBqdzevYiOUtIY83w= 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-Google-Smtp-Source: AMsMyM7ZMY+fie+cniMXOHnWwxFJhy2lLSjp1K5br3hAiwB6o1KSOUAuu2bprO2/qpCXnoh9BBamNA== 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) From: Andrew Burgess To: binutils@sourceware.org Cc: Andrew Burgess 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 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true 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 List-Id: *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) { -- 2.25.4