-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 1.8.1
-
Component/s: None
-
None
We need pure C99 for the R bindings (no GNU extensions).
-I/usr/local/include -fPIC -Wall -pedantic -c mongoc/mongoc-cluster.c -o mongoc/mongoc-cluster.o mongoc/mongoc-client.c:2549:4: warning: void function '_mongoc_client_push_server_session' should not return void expression [-Wpedantic] return _mongoc_topology_push_server_session (client->topology, ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 warning generated. mongoc/mongoc-cluster.c:124:31: warning: arithmetic on a pointer to void is a GNU extension [-Wpointer-arith] iov[n].iov_base + difference, ~~~~~~~~~~~~~~~ ^ /usr/include/secure/_string.h:62:33: note: expanded from macro 'memcpy' __builtin___memcpy_chk (dest, __VA_ARGS__, __darwin_obsz0 (dest))
To fix simply cast the pointer to a typed pointer (e.g. int*) before incrementing it.