Julien Grall writes ("[PATCH 3/8] tools/libxc: misc: Mark const the parameter 
'keys' of xc_send_debug_keys()"):
> From: Julien Grall <jgr...@amazon.com>
> 
> 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 <dfaggi...@suse.com>
> Signed-off-by: Julien Grall <jgr...@amazon.com>

Reviewed-by: Ian Jackson <ian.jack...@eu.citrix.com>

Reply via email to