-
Type:
Improvement
-
Resolution: Done
-
Priority:
Major - P3
-
Affects Version/s: 1.5.0
-
Component/s: None
-
None
The OPT_BSON_ERR() macro returns NULL on failure, but the macro is also used in functions that expect to return booleans.
[2016/11/14 17:16:21.703] src/mongoc/mongoc-cursor.c:901:7: error: incompatible pointer to integer conversion returning 'void *' from a function with result type 'bool' (aka 'signed char') [-Werror,-Wint-conversion] [2016/11/14 17:16:21.703] OPT_BSON_ERR ("Invalid 'opts' parameter."); [2016/11/14 17:16:21.703] ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [2016/11/14 17:16:21.703] src/mongoc/mongoc-cursor.c:860:14: note: expanded from macro 'OPT_BSON_ERR' [2016/11/14 17:16:21.703] return NULL; \ [2016/11/14 17:16:21.703] ^~~~