The following error recently popped up in the PHPC builds after bjori added -Werror to our build flags (here):
home/travis/build/10gen-labs/mongo-php-driver-prototype/src/libmongoc/src/mongoc/mongoc-matcher-op.c:165:4: error: comparison of unsigned expression >= 0 is always true [-Werror=type-limits]
I traced this back to this commit.
While we could suppress this error with [-Wno-type-limits], that might hide other errors, too. Some ideas tossed around in this thread include adding an unused negative value to the enum to force a signed type to be used (which seems noisy) or to for a signed cast before the comparison. Alternatively, we can just do without the >= MONGOC_MATCHER_OPCODE_EQ part of the assertion if we want to rely on the enum being unsigned and MONGOC_MATCHER_OPCODE_EQ being zero.