From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id KJERCO8HAWTefwIAWB0awg (envelope-from ) for ; Thu, 02 Mar 2023 15:32:47 -0500 Received: by simark.ca (Postfix, from userid 112) id 1EEA41E223; Thu, 2 Mar 2023 15:32:47 -0500 (EST) 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=Y8l9Anqg; 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=-7.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, RDNS_DYNAMIC,URIBL_BLOCKED autolearn=unavailable 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 A9C411E0D3 for ; Thu, 2 Mar 2023 15:32:46 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 56B383858002 for ; Thu, 2 Mar 2023 20:32:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 56B383858002 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1677789166; bh=1cXapGj+HkgUfGPLzCqsTrBe7gYYvXdpV6JxWbfzt0o=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=Y8l9AnqgCuacOgU2+Lu+TTrhXphJ+QdvIMTAYdRh72DZEydAr2xrJKm4BSr483l+L VKEgdt1ubaYF76A/IE4Hz2MrUJY7taxvwOIwI/VTdPsEQq7ct3G5DlXO0Ei2JHXDZw pnINqr/LAlbGXpbghF65Q8TDByOkdvWiO8Oc3m7A= Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 268AD3858C53 for ; Thu, 2 Mar 2023 20:32:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 268AD3858C53 Received: from smarchi-efficios.internal.efficios.com (192-222-180-24.qc.cable.ebox.net [192.222.180.24]) (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 ESMTPSA id C386B1E224; Thu, 2 Mar 2023 15:32:25 -0500 (EST) To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH 3/3] gdb: initialize interp::next Date: Thu, 2 Mar 2023 15:32:24 -0500 Message-Id: <20230302203224.118345-4-simon.marchi@efficios.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230302203224.118345-1-simon.marchi@efficios.com> References: <20230302203224.118345-1-simon.marchi@efficios.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: Simon Marchi via Gdb-patches Reply-To: Simon Marchi Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" From: Simon Marchi This field is never initialized, it seems to me like it would be a good idea to initialize it to nullptr to avoid bad surprises. Change-Id: I8c04319d564f5d385d8bf0acee758f6ce28b4447 --- gdb/interps.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/interps.h b/gdb/interps.h index 62f37951ddea..29248093c671 100644 --- a/gdb/interps.h +++ b/gdb/interps.h @@ -87,7 +87,7 @@ class interp public: /* Interpreters are stored in a linked list, this is the next one... */ - struct interp *next; + interp *next = nullptr; /* Has the init method been run? */ bool inited = false; -- 2.39.2