mirror of
https://github.com/isar/libmdbx.git
synced 2024-12-30 03:34:13 +08:00
mdbx: disable -Wno-constant-logical-operand inplace.
Change-Id: I0f7745f40e3340ba6d14d985a735777667a7bdde
This commit is contained in:
parent
f76c5188fb
commit
a2099586ed
2
Makefile
2
Makefile
@ -24,7 +24,7 @@ suffix ?=
|
|||||||
CC ?= gcc
|
CC ?= gcc
|
||||||
CXX ?= g++
|
CXX ?= g++
|
||||||
XCFLAGS ?= -DNDEBUG=1 -DMDBX_DEBUG=0 -DLIBMDBX_EXPORTS=1
|
XCFLAGS ?= -DNDEBUG=1 -DMDBX_DEBUG=0 -DLIBMDBX_EXPORTS=1
|
||||||
CFLAGS ?= -O2 -g3 -Wall -Wno-constant-logical-operand -Werror -Wextra -ffunction-sections -fPIC -fvisibility=hidden
|
CFLAGS ?= -O2 -g3 -Wall -Werror -Wextra -ffunction-sections -fPIC -fvisibility=hidden
|
||||||
CFLAGS += -D_GNU_SOURCE=1 -std=gnu11 -pthread $(XCFLAGS)
|
CFLAGS += -D_GNU_SOURCE=1 -std=gnu11 -pthread $(XCFLAGS)
|
||||||
CXXFLAGS = -std=c++11 $(filter-out -std=gnu11,$(CFLAGS))
|
CXXFLAGS = -std=c++11 $(filter-out -std=gnu11,$(CFLAGS))
|
||||||
TESTDB ?= $(shell [ -d /dev/shm ] && echo /dev/shm || echo /tmp)/mdbx-check.db
|
TESTDB ?= $(shell [ -d /dev/shm ] && echo /dev/shm || echo /tmp)/mdbx-check.db
|
||||||
|
10
src/bits.h
10
src/bits.h
@ -88,6 +88,16 @@
|
|||||||
# warning "libmdbx don't compatible with ThreadSanitizer, you will get a lot of false-positive issues."
|
# warning "libmdbx don't compatible with ThreadSanitizer, you will get a lot of false-positive issues."
|
||||||
#endif /* __SANITIZE_THREAD__ */
|
#endif /* __SANITIZE_THREAD__ */
|
||||||
|
|
||||||
|
#if __has_warning("-Wconstant-logical-operand")
|
||||||
|
#if defined(__clang__)
|
||||||
|
#pragma clang diagnostic ignored "-Wconstant-logical-operand"
|
||||||
|
#elif defined(__GNUC__)
|
||||||
|
#pragma GCC diagnostic ignored "-Wconstant-logical-operand"
|
||||||
|
#else
|
||||||
|
#pragma warning disable "constant-logical-operand"
|
||||||
|
#endif
|
||||||
|
#endif /* -Wconstant-logical-operand */
|
||||||
|
|
||||||
#include "./osal.h"
|
#include "./osal.h"
|
||||||
|
|
||||||
/* *INDENT-ON* */
|
/* *INDENT-ON* */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user