[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 3/8] tools/libxc: misc: Mark const the parameter 'keys' of xc_send_debug_keys()
Julien Grall writes ("[PATCH 3/8] tools/libxc: misc: Mark const the parameter 'keys' of xc_send_debug_keys()"): > From: Julien Grall <jgrall@xxxxxxxxxx> > > OCaml is using a string to describe the parameter 'keys' of > xc_send_debug_keys(). Since Ocaml 4.06.01, String_val() will return a > const char * when using -safe-string. This will result to a build > failure because xc_send_debug_keys() expects a char *. > > The function should never modify the parameter 'keys' and therefore the > parameter should be const. Unfortunately, this is not directly possible > because DECLARE_HYPERCALL_BOUNCE() is expecting a non-const variable. > > A new macro DECLARE_HYPERCALL_BOUNCE_IN() is introduced and will take > care of const parameter. The first user will be xc_send_debug_keys() but > this can be used in more place in the future. > > Reported-by: Dario Faggioli <dfaggioli@xxxxxxxx> > Signed-off-by: Julien Grall <jgrall@xxxxxxxxxx> Reviewed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |