Skip to content

Commit d86254d

Browse files
committed
Merge temporary fix for bug 24953645 to suppress OS X compile warnings saying that range checks are redundant.
1 parent 936ddb8 commit d86254d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/njs/src/njsConnection.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,14 @@ Nan::Persistent<FunctionTemplate> Connection::connectionTemplate_s;
7373

7474
#define NJS_SIZE_T_MAX std::numeric_limits<std::size_t>::max()
7575

76+
// Temporarily suppress compile warnings that certain NJS_SIZE_T_OVERFLOW
77+
// calls can never overflow, and are therefore redundant.
78+
// These are seen on OS X.
79+
#if defined(__clang__)
80+
#pragma clang diagnostic ignored "-Wtautological-constant-out-of-range-compare"
81+
#endif
82+
// End temporary patch
83+
7684
#define NJS_SIZE_T_OVERFLOW(maxSize,maxRows) \
7785
( ( ( maxSize != 0 ) && \
7886
( ( ( NJS_SIZE_T_MAX ) / ( (size_t)maxSize ) ) < (maxRows) ) ) ? 1 : 0) \

0 commit comments

Comments
 (0)