[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen master] tools/libs: guest: Fix Arm build after 8fc4916daf2a



commit 935abe1cc463917c697c1451ec8d313a5d75f7de
Author:     Julien Grall <jgrall@xxxxxxxxxx>
AuthorDate: Tue May 18 18:03:05 2021 +0100
Commit:     Julien Grall <jgrall@xxxxxxxxxx>
CommitDate: Wed May 19 13:35:54 2021 +0100

    tools/libs: guest: Fix Arm build after 8fc4916daf2a
    
    Gitlab CI spotted an issue when building the tools Arm:
    
    xg_dom_arm.c: In function 'meminit':
    xg_dom_arm.c:401:50: error: passing argument 3 of 'set_mode' discards 
'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
      401 |     rc = set_mode(dom->xch, dom->guest_domid, dom->guest_type);
          |                                               ~~~^~~~~~~~~~~~
    
    This is because the const was not propagated in the Arm code. Fix it
    by constifying the 3rd parameter of set_mode().
    
    Fixes: 8fc4916daf2a ("tools/libs: guest: Use const whenever we point to 
literal strings")
    Signed-off-by: Julien Grall <jgrall@xxxxxxxxxx>
    Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
 tools/libs/guest/xg_dom_arm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/libs/guest/xg_dom_arm.c b/tools/libs/guest/xg_dom_arm.c
index b4c24f15fb..01e85e0ea9 100644
--- a/tools/libs/guest/xg_dom_arm.c
+++ b/tools/libs/guest/xg_dom_arm.c
@@ -195,7 +195,7 @@ static int vcpu_arm64(struct xc_dom_image *dom)
 
 /* ------------------------------------------------------------------------ */
 
-static int set_mode(xc_interface *xch, uint32_t domid, char *guest_type)
+static int set_mode(xc_interface *xch, uint32_t domid, const char *guest_type)
 {
     static const struct {
         char           *guest;
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.