Skip to content

Commit a48d38b

Browse files
committed
Merge pull request #256 from jmikola/cdriver-757
CDRIVER-757: Suppress GCC warning for enum range check
2 parents ca72f65 + 8fe8742 commit a48d38b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/mongoc/mongoc-matcher-op.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,15 @@ _mongoc_matcher_op_compare_new (mongoc_matcher_opcode_t opcode, /* IN */
162162
{
163163
mongoc_matcher_op_t *op;
164164

165+
#if defined(__GNUC__)
166+
# pragma GCC diagnostic push
167+
# pragma GCC diagnostic ignored "-Wtype-limits"
168+
#endif
165169
BSON_ASSERT ((opcode >= MONGOC_MATCHER_OPCODE_EQ) &&
166170
(opcode <= MONGOC_MATCHER_OPCODE_NIN));
171+
#if defined(__GNUC__)
172+
# pragma GCC diagnostic pop
173+
#endif
167174
BSON_ASSERT (path);
168175
BSON_ASSERT (iter);
169176

0 commit comments

Comments
 (0)