mirror of
https://github.com/isar/libmdbx.git
synced 2024-10-29 23:19:20 +08:00
mdbx: новый/поправленный clang-format.
This commit is contained in:
parent
a430b3b288
commit
cb743d44fc
2
mdbx.h
2
mdbx.h
@ -559,7 +559,7 @@ typedef mode_t mdbx_mode_t;
|
|||||||
} \
|
} \
|
||||||
MDBX_NOSANITIZE_ENUM MDBX_CXX01_CONSTEXPR ENUM operator&(unsigned a, \
|
MDBX_NOSANITIZE_ENUM MDBX_CXX01_CONSTEXPR ENUM operator&(unsigned a, \
|
||||||
ENUM b) { \
|
ENUM b) { \
|
||||||
return ENUM(a & unsigned(b)); \
|
return ENUM(a &unsigned(b)); \
|
||||||
} \
|
} \
|
||||||
MDBX_NOSANITIZE_ENUM MDBX_CXX14_CONSTEXPR ENUM &operator&=(ENUM &a, \
|
MDBX_NOSANITIZE_ENUM MDBX_CXX14_CONSTEXPR ENUM &operator&=(ENUM &a, \
|
||||||
ENUM b) { \
|
ENUM b) { \
|
||||||
|
@ -580,8 +580,8 @@ static void histogram_acc(const size_t n, struct MDBX_chk_histogram *p) {
|
|||||||
// использованы еще не все слоты, добавляем интервал
|
// использованы еще не все слоты, добавляем интервал
|
||||||
assert(i < size);
|
assert(i < size);
|
||||||
if (p->ranges[i].count) {
|
if (p->ranges[i].count) {
|
||||||
assert(i < last);
|
|
||||||
// раздвигаем
|
// раздвигаем
|
||||||
|
assert(i < last);
|
||||||
#ifdef __COVERITY__
|
#ifdef __COVERITY__
|
||||||
if (i < last) /* avoid Coverity false-positive issue */
|
if (i < last) /* avoid Coverity false-positive issue */
|
||||||
#endif /* __COVERITY__ */
|
#endif /* __COVERITY__ */
|
||||||
|
@ -621,16 +621,16 @@ __cold MDBX_INTERNAL int lck_init(MDBX_env *env, MDBX_env *inprocess_neighbor,
|
|||||||
if LCK already opened/used inside current process */
|
if LCK already opened/used inside current process */
|
||||||
;
|
;
|
||||||
|
|
||||||
/* FIXME: Unfortunately, there is no other reliable way but to long testing
|
/* FIXME: Unfortunately, there is no other reliable way but to long testing
|
||||||
* on each platform. On the other hand, behavior like FreeBSD is incorrect
|
* on each platform. On the other hand, behavior like FreeBSD is incorrect
|
||||||
* and we can expect it to be rare. Moreover, even on FreeBSD without
|
* and we can expect it to be rare. Moreover, even on FreeBSD without
|
||||||
* additional in-process initialization, the probability of an problem
|
* additional in-process initialization, the probability of an problem
|
||||||
* occurring is vanishingly small, and the symptom is a return of EINVAL
|
* occurring is vanishingly small, and the symptom is a return of EINVAL
|
||||||
* while locking a mutex. In other words, in the worst case, the problem
|
* while locking a mutex. In other words, in the worst case, the problem
|
||||||
* results in an EINVAL error at the start of the transaction, but NOT data
|
* results in an EINVAL error at the start of the transaction, but NOT data
|
||||||
* loss, nor database corruption, nor other fatal troubles. Thus, the code
|
* loss, nor database corruption, nor other fatal troubles. Thus, the code
|
||||||
* below I am inclined to think the workaround for erroneous platforms (like
|
* below I am inclined to think the workaround for erroneous platforms (like
|
||||||
* FreeBSD), rather than a defect of libmdbx. */
|
* FreeBSD), rather than a defect of libmdbx. */
|
||||||
#if defined(__FreeBSD__)
|
#if defined(__FreeBSD__)
|
||||||
/* seems that shared mutexes on FreeBSD required in-process initialization */
|
/* seems that shared mutexes on FreeBSD required in-process initialization */
|
||||||
(void)global_uniqueness_flag;
|
(void)global_uniqueness_flag;
|
||||||
|
Loading…
Reference in New Issue
Block a user