libxl: compilation warning fix for arm & aarch64
PATCH 1/1 libxl: compilation warning fix for arm & aarch64
From: Chris Patterson <[email protected]>
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.
--- tools/libxl/xl_cmdimpl.c | 3 +++ 1 file changed, 3 insertions(+)
tools/libxl/xl_cmdimpl.c +3 -0
@@ -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
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Quoted 18 lines · Chris Patterson
From: Chris Patterson <[email protected]>
GCC 6 will warn on unused static const variables in c modules:
https://gcc.gnu.org/ml/gcc-patches/2015-09/msg00847.htmlWhen compiling with
LIBXL_HAVE_NO_SUSPEND_RESUMEset (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:
Quoted 7 lines
#ifndef LIBXL_HAVE_NO_SUSPEND_RESUME ... #endifWrap the same ifndef around these variables.
Signed-off-by Chris Patterson <[email protected]>
Quoted 28 lines
--- tools/libxl/xl_cmdimpl.c | 3 +++ 1 file changed, 3 insertions(+)tools/libxl/xl_cmdimpl.c +3
-0@@ -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 Signature · 1 line
2.1.4
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 23 lines · Wei Liu
Quoted 22 lines · Chris Patterson
From: Chris Patterson <[email protected]>
GCC 6 will warn on unused static const variables in c modules:
https://gcc.gnu.org/ml/gcc-patches/2015-09/msg00847.htmlWhen compiling with
LIBXL_HAVE_NO_SUSPEND_RESUMEset (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
Quoted 6 lines
Quoted 3 lines
Wrap the same ifndef around these variables.
Signed-off-by Chris Patterson <[email protected]>Acked-by Wei Liu <[email protected]>
Pushed.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel