]> xenbits.xensource.com Git - xen.git/commit
libxl: compilation warning fix for arm & aarch64
authorChris Patterson <pattersonc@ainfosec.com>
Wed, 27 Jul 2016 20:01:26 +0000 (16:01 -0400)
committerWei Liu <wei.liu2@citrix.com>
Mon, 1 Aug 2016 08:06:43 +0000 (09:06 +0100)
commit5f28de0b0e474e01931b719fa27ca30b8aa446e0
treedaef2f95d01443265eac3fa1f6f200649335e537
parent88d61459827ba534fec5e8f099d737cb868c5b23
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>
tools/libxl/xl_cmdimpl.c