tools/libs: guest: Fix Arm build after 8fc4916daf2a
authorJulien Grall <jgrall@amazon.com>
Tue, 18 May 2021 17:03:05 +0000 (18:03 +0100)
committerJulien Grall <jgrall@amazon.com>
Wed, 19 May 2021 12:35:54 +0000 (13:35 +0100)
commit935abe1cc463917c697c1451ec8d313a5d75f7de
tree6842fd5c5d0ffffdf59bc9dd60288a2ef6b3b5c5
parent01d84420fb4a9be2ec474a7c1910bb22c28b53c8
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@amazon.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
tools/libs/guest/xg_dom_arm.c