Subject: Re: -Wcast-qual and assignement to strucutres
To: None <tech-kern@netbsd.org>
From: Christos Zoulas <christos@astron.com>
List: tech-kern
Date: 02/13/2006 01:01:13
In article <20060213003353.GA8410@antioche.eu.org>,
Manuel Bouyer <bouyer@antioche.eu.org> wrote:
>Hi,
>I've a problem with -Wcast-qual: I have the following function:
>
>static int
>xs_talkv(struct xenbus_transaction *t,
> enum xsd_sockmsg_type type,
> const struct iovec *iovec,
> unsigned int num_vecs,
> unsigned int *len,
> char **retbuf);
>[...]
>static int
>xs_single(struct xenbus_transaction *t,
> enum xsd_sockmsg_type type,
> const char *string,
> unsigned int *len,
> char **ret)
>{
> struct iovec iovec;
>
> iovec.iov_base = string;
> iovec.iov_len = strlen(string) + 1;
> return xs_talkv(t, type, &iovec, 1, len, ret);
iovec.iov_base = __UNCONST(string);
christos