mdbx: новый/поправленный clang-format.

This commit is contained in:
Леонид Юрьев (Leonid Yuriev) 2024-07-24 11:27:41 +03:00
parent a430b3b288
commit cb743d44fc
3 changed files with 12 additions and 12 deletions

2
mdbx.h
View File

@ -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) { \

View File

@ -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__ */

View File

@ -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;