From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Yu, Mingli via lttng-dev" Subject: Re: [babeltrace][PATCH] fs.c: initialize the other_entry variable Date: Thu, 12 Mar 2020 03:37:18 +0000 Message-ID: References: <1583933970-68840-1-git-send-email-mingli.yu@windriver.com>, Reply-To: "Yu, Mingli" Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail5.wrs.com (mail5.windriver.com [192.103.53.11]) by lists.lttng.org (Postfix) with ESMTPS id 48dGCL5pJwz1GjY for ; Thu, 12 Mar 2020 00:32:46 -0400 (EDT) In-Reply-To: Content-Language: en-US List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lttng-dev-bounces@lists.lttng.org Sender: "lttng-dev" To: Simon Marchi , "lttng-dev@lists.lttng.org" List-Id: lttng-dev@lists.lttng.org Hi Simon, The compiler: GCC 9.2.0 The error can occur when additionally add " -Og". Thanks, Mingli ________________________________________ From: Simon Marchi [simark@simark.ca] Sent: Wednesday, March 11, 2020 9:52 PM To: Yu, Mingli; lttng-dev@lists.lttng.org Subject: Re: [lttng-dev] [babeltrace][PATCH] fs.c: initialize the other_entry variable On 2020-03-11 9:39 a.m., mingli.yu@windriver.com wrote: > From: Mingli Yu > > Initialize the pointer other_entry to fix the below error: > | ../../../../../git/src/plugins/ctf/fs-src/fs.c: In function 'ds_index_insert_ds_index_entry_sorted': > | ../../../../../git/src/plugins/ctf/fs-src/fs.c:702:5: error: 'other_entry' may be used uninitialized in this function [-Werror=maybe-uninitialized] > | 702 | !ds_index_entries_equal(entry, other_entry)) { > > Signed-off-by: Mingli Yu Hi Mingli, Thanks for the patch. Could you please mention the compiler you are using (which architecture and which version), as well as the full command line used to compile that file (shown with "make V=1"? Thank you, Simon