[lttng-dev] [babeltrace][PATCH] fs.c: initialize the other_entry variable

Yu, Mingli Mingli.Yu at windriver.com
Wed Mar 11 23:37:18 EDT 2020


Hi Simon,

The compiler: GCC 9.2.0
The error can occur when additionally add " -Og".

Thanks,
Mingli
________________________________________
From: Simon Marchi [simark at simark.ca]
Sent: Wednesday, March 11, 2020 9:52 PM
To: Yu, Mingli; lttng-dev at 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 at windriver.com wrote:
> From: Mingli Yu <mingli.yu at windriver.com>
>
> 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 <mingli.yu at windriver.com>

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


More information about the lttng-dev mailing list