From therneau at mayo.edu  Fri Dec 29 14:14:36 2017
From: therneau at mayo.edu (Therneau, Terry M., Ph.D.)
Date: Fri, 29 Dec 2017 07:14:36 -0600
Subject: [Rd] winbuilder warning message wrt function pointers
Message-ID: <375144$8j4pe9@ironport10.mayo.edu>

I've recently updated the coxme package, which calls internal routines from the bdsmatrix 
package.? (It is in fact mentioned as an example of this in the Extensions manual.)
The call connections are a blocks like this, one for each of the 9 called C routines.

void bdsmatrix_prod4(int nrow,??? int nblock,?? int *bsize,
 ??????????????????? double *bmat, double *rmat,
 ??????????????????? int nfrail,?? double *y) {
 ??? static void (*fun)() = NULL;
 ??? if (fun==NULL)
 ??? fun = (void (*)) R_GetCCallable("bdsmatrix", "bdsmatrix_prod4");
 ??? fun(nrow, nblock, bsize, bmat, rmat, nfrail, y);
 ??? }

..

The winbuilder run is flagging all of these with

bdsmatrix_stub.h:22:6: warning: ISO C forbids assignment between function pointer and 
'void *' [-Wpedantic]
 ? fun = (void (*)) R_GetCCallable("bdsmatrix", "bdsmatrix_prod4");

Ignore?? Or should these lines have been written in a different way?

Terry T.



[Rd] winbuilder warning message wrt function pointers
Therneau, Terry M., Ph.D.