From 4d2e669ca92cbd9ebecfafdce4685bc31241015a Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Thu, 2 Mar 2023 15:32:24 -0500 Subject: [PATCH] gdb: initialize interp::next 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 Reviewed-By: Tom Tromey --- gdb/interps.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/interps.h b/gdb/interps.h index 62f37951dde..29248093c67 100644 --- a/gdb/interps.h +++ b/gdb/interps.h @@ -87,7 +87,7 @@ private: 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.30.2