Hi Craig,
On Mon, Aug 15, 2005 at 09:16:26PM -0400, Craig Rodrigues wrote:
> GCC gave me some problems when I tried passing "const char *" to
> functions which took "char *" parameters for the attribute name.
With your patch gcc is still giving me problems, and it needed
a fair bit of tweaking just to get it to compile on Linux.
There was some issue because this...
> typedef struct xfs_da_args {
> - uchar_t *name; /* string (maybe not NULL terminated) */
> + const uchar_t *name; /* string (maybe not NULL terminated) */
> int namelen; /* length of string (maybe no NULL) */
> uchar_t *value; /* set of bytes (maybe contain NULLs) */
> int valuelen; /* length of value */
meant assignments to args.name in attr get/set/remove produced
compiler warnings which I just couldn't shake for some (still
unknown) reason...
In the end, I gave it up as a waste of time :) - I suggest you
either cast it to (char *) in the high level platform-specific
wrappers around the core XFS ext attr code (as is already done
for linux-2.6/xfs_iops.c actually). If you really want to go
with your patch, please make it compile on Linux with a recent
gcc, without warnings (of course!), and resend... thanks.
cheers.
--
Nathan
|