[ovs-dev] [PATCH] Make struct stress_option members const
Simon Horman
horms at verge.net.au
Thu Mar 22 22:40:24 UTC 2012
On Thu, Mar 22, 2012 at 10:07:06AM -0700, Ben Pfaff wrote:
> On Thu, Mar 22, 2012 at 03:43:35PM +0900, Simon Horman wrote:
> > Make the name and description members of struct stress_option
> > const as they are used to store constant strings.
> >
> > Signed-off-by: Simon Horman <horms at verge.net.au>
>
> With this patch, I get from GCC:
>
> ../lib/process.h:26: note: expected ‘char **’ but argument is of type ‘const char **'
>
> and from sparse:
>
> ../ovsdb/ovsdb-server.c:128:32: warning: incorrect type in argument 1 (different modifiers)
> ../ovsdb/ovsdb-server.c:128:32: expected char **argv
> ../ovsdb/ovsdb-server.c:128:32: got char const **<noident>
> ../ovsdb/ovsdb-server.c:128: error: passing argument 1 of ‘process_start’ from incompatible pointer type
>
I'm not doing very well with these const patches am I :(
More information about the dev
mailing list