Fix rxgen-generated warnings
authorAndrew Deason <adeason@sinenomine.net>
Thu, 15 Oct 2009 17:48:08 +0000 (13:48 -0400)
committerJeffrey Altman <jaltman|account-1000011@unknown>
Fri, 16 Oct 2009 20:11:02 +0000 (13:11 -0700)
commit508bcd69b5ad55bcadf26d9b748f175c7a33ce77
tree2f197b86868b32b9f08d32361e6523b0f08caa25
parentfe68604f113773c1ffcb6d83d4a2febc3e0e3ed8
Fix rxgen-generated warnings

Prevent rxgen from generating code that produces warnings at compile
time.

 * Add print_ifarg_with_cast().  Used within print_ifstat() to generate
   a member in an argument list complete with a type cast.  The type
   cast may be a pointer to the type or the type depending on the value
   of the 'ptr_to' parameter.

 * When print_ifstat() generates the output for an opaque vector, cast
   the object to 'caddr_t' as xdr_opaque() accepts an argument of type
   'caddr_t'.

 * When print_ifstat() generates the output for an opaque array, cast
   the object to 'char **' because xdr_bytes() accepts an argument of
   type 'char **'.

 * When print_ifstat() generates the output for any array that is not
   opaque or string, cast the object to 'caddr_t' because all of the
   xdr_XXX() functions other than xdr_opaque and xdr_bytes accept an
   argument of type 'caddr_t'.

 * When print_ifstat() generates the output for an alias, cast the
   output to a pointer to the specified type because xdr_<type> accepts
   an argument of type '<type> *'.

This addresses warnings generated when compiling fsint/Kvice.xdr.c and
fsint/afsint.xdr.c.

Reviewed-on: http://gerrit.openafs.org/664
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
README.WARNINGS
src/fsint/Makefile.in
src/rxgen/rpc_cout.c