[oe] [PATCH] rocksdb: Fix compile error for DEBUG_BUILD

Adrian Bunk bunk at stusta.de
Thu Jan 9 08:14:06 UTC 2020


On Thu, Jan 09, 2020 at 03:13:57PM +0800, Robert Yang wrote:
> 
> 
> On 1/8/20 5:27 PM, Adrian Bunk wrote:
> > On Wed, Jan 08, 2020 at 02:09:03PM +0800, Robert Yang wrote:
> > > Fixed do_compile error when DEBUG_BUILD = "1":
> > > db/write_thread.cc:183:14: error: 'state' may be used uninitialized in this function [-Werror=maybe-uninitialized]
> > > ...
> > 
> > -Og warnings are not 100% reliable, and in general -Werror is
> > problematic for distributions.
> > 
> > Does building with -DFAIL_ON_WARNINGS=OFF fix this problem?
> 
> Yes, it works.
> 
> I think that the correct way to fix it is initialize it rather than ignore
> the error.

Is the error a bug in the code, or is it a bogus warning from the compiler?

When the warning happens only with -Og this is a known case of bogus 
warnings in gcc, and the correct way to fix it is to ignore the bogus
warning.

> // Robert

cu
Adrian


More information about the Openembedded-devel mailing list