[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

WARNINGS in examples/bench/rpcgen

Compiling examples/bench/rpcgen I get the several warngs of the type:

cc -std -O2 -c -o oalltests_xdr.o alltests_xdr.c

cc: Warning: alltests_xdr.c, line 78: In this statement, the referenced type of
the pointer value "xdr_char" is "function (pointer to struct XDR, pointer to char) returning int", 
which is not compatible with "function (pointer to struct XDR, pointer to pointer to char, ...) returning int". (ptrmismatch)
         if(!xdr_vector(xdrs, (char *)objp->sptr, 100, sizeof(char), xdr_char)) {

This and others like it can be resolved by editting alltests_xdr.c :
typedef int (* pf)(XDR*, char**, ...);
         if(!xdr_vector(xdrs, (char *)objp->sptr, 100, sizeof(char), (pf)xdr_char)) {

I do not know how to do this to alltests.x, however.