-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
C driver commit d6984c8331a2bcd2ff0d2850b222d00c20f6a079 fixed almost all of the GCC pedantic warnings in the code base (c.f., CDRIVER-3576). However, there was one class of warning where GCC complained of converting between function pointers and object pointers. These still need to be resolved.
The following code block exists in several files in the code base:
/* * Prevent failing on pedantic GCC warning: "ISO C forbids conversion of * function pointer to object pointer type. */ #if __GNUC__ > 6 #pragma GCC diagnostic warning "-Wpedantic" #else #pragma GCC diagnostic warning "-pedantic" #endif
These are the files:
- src/libmongoc/tests/TestSuite.c
- src/libmongoc/tests/test-mongoc-client-session.c
- src/libmongoc/tests/test-mongoc-cursor.c
- src/libmongoc/tests/test-mongoc-long-namespace.c
In order to properly fix this, the above referenced code block needs to be removed from those files and the code built with the options -pedantic -Wall -Werror. Note that -pedantic and -Wall are defaults when maintainer flags are enabled. However, -Werror is not standard.
- causes
-
CDRIVER-4151 Incorrect Test Registration with Static TestFnCtx
- Closed
- related to
-
CDRIVER-3576 Compiler warnings on mingw-w64
- Closed
-
CDRIVER-3972 bson-oid.h conversion warning
- Closed