diff options
author | Chris Patterson <pattersonc@ainfosec.com> | 2016-07-27 16:01:26 -0400 |
---|---|---|
committer | Ian Jackson <ian.jackson@eu.citrix.com> | 2019-05-30 13:56:24 +0100 |
commit | 6ebcc5b28d5f80e3b04c96d691577833fdae215a (patch) | |
tree | 48be16d5c29830e55c73dbc9d970638f65042a6a | |
parent | 7f54219572caced98a133072546ad890897b9827 (diff) | |
download | xen-6ebcc5b28d5f80e3b04c96d691577833fdae215a.tar.gz |
libxl: compilation warning fix for arm & aarch64
GCC 6 will warn on unused static const variables in c modules:
https://gcc.gnu.org/ml/gcc-patches/2015-09/msg00847.html
When compiling with LIBXL_HAVE_NO_SUSPEND_RESUME set (arm & aarch64),
the compiler emits the following errors:
xl_cmdimpl.c:101:19: error: 'migrate_report'
defined but not used [-Werror=unused-const-variable=]
xl_cmdimpl.c:99:19: error: 'migrate_permission_to_go'
defined but not used [-Werror=unused-const-variable=]
xl_cmdimpl.c:97:19: error: 'migrate_receiver_ready'
defined but not used [-Werror=unused-const-variable=]
xl_cmdimpl.c:95:19: error: 'migrate_receiver_banner'
defined but not used [-Werror=unused-const-variable=]
These unused const variables are only used in functions which exist between
the ifndef block:
#ifndef LIBXL_HAVE_NO_SUSPEND_RESUME
...
#endif
Wrap the same ifndef around these variables.
Signed-off-by: Chris Patterson <pattersonc@ainfosec.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
(cherry picked from commit 5f28de0b0e474e01931b719fa27ca30b8aa446e0)
(cherry picked from commit c51a3a5826a64f0807545460bfc35022dc9c8428)
-rw-r--r-- | tools/libxl/xl_cmdimpl.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index b01d6f7700..201b337b09 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -92,6 +92,7 @@ static int fd_lock = -1; static const char savefileheader_magic[32]= "Xen saved domain, xl format\n \0 \r"; +#ifndef LIBXL_HAVE_NO_SUSPEND_RESUME static const char migrate_receiver_banner[]= "xl migration receiver ready, send binary domain data.\n"; static const char migrate_receiver_ready[]= @@ -100,6 +101,8 @@ static const char migrate_permission_to_go[]= "domain is yours, you are cleared to unpause"; static const char migrate_report[]= "my copy unpause results are as follows"; +#endif + /* followed by one byte: * 0: everything went well, domain is running * next thing is we all exit |