diff options
author | Vasil Dimov <vd@FreeBSD.org> | 2020-05-01 14:05:48 +0200 |
---|---|---|
committer | Vasil Dimov <vd@FreeBSD.org> | 2020-05-03 17:21:45 +0200 |
commit | 71f183a49b714a28622277fa668d8f9f3dac0aae (patch) | |
tree | 34c61e4835aff14a38eec1982777a6a6ec47a890 /src/Makefile.leveldb.include | |
parent | ddc0a600b38ac6cef044085cdee46649fc437562 (diff) |
build: warn on potentially uninitialized reads
Enable -Wconditional-uninitialized to warn on potentially uninitialized
reads.
Fix the sole such warning in Bitcoin Core in GetRdRand(): r1 would be
set to 0 on rdrand failure, so initializing it to 0 is a non-functional
change.
From "Intel 64 and IA-32 ArchitecturesSoftware Developer's Manual" [1],
page 1711: "CF=1 indicates that the data in the destination is valid.
Otherwise CF=0 and the data in the destination operand will be returned
as zeros for the specified width."
[1] https://software.intel.com/sites/default/files/managed/39/c5/325462-sdm-vol-1-2abcd-3abcd.pdf
Diffstat (limited to 'src/Makefile.leveldb.include')
-rw-r--r-- | src/Makefile.leveldb.include | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Makefile.leveldb.include b/src/Makefile.leveldb.include index 04b53471e4..79ff72ca8d 100644 --- a/src/Makefile.leveldb.include +++ b/src/Makefile.leveldb.include @@ -36,7 +36,7 @@ LEVELDB_CPPFLAGS_INT += -DLEVELDB_PLATFORM_POSIX endif leveldb_libleveldb_a_CPPFLAGS = $(AM_CPPFLAGS) $(LEVELDB_CPPFLAGS_INT) $(LEVELDB_CPPFLAGS) -leveldb_libleveldb_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) +leveldb_libleveldb_a_CXXFLAGS = $(filter-out -Wconditional-uninitialized -Werror=conditional-uninitialized, $(AM_CXXFLAGS)) $(PIE_FLAGS) leveldb_libleveldb_a_SOURCES= leveldb_libleveldb_a_SOURCES += leveldb/port/port_stdcxx.h |