Olaf Hering
2011-May-19 19:05 UTC
[Xen-devel] [PATCH 00 of 45] gcc 4.6 compile fixes for xen-unstable
The following series fix compile errors with gcc 4.6. Please review if each change is correct. Thanks, Olaf tools/console/client/main.c | 3 -- tools/debugger/gdbsx/gx/gx_comm.c | 2 - tools/firmware/rombios/32bit/tcgbios/tcgbios.c | 2 - tools/libxc/xc_domain_restore.c | 2 - tools/libxc/xc_tmem.c | 3 -- tools/libxl/libxl.c | 6 ++--- tools/libxl/libxl_dom.c | 4 +-- tools/libxl/libxl_pci.c | 2 - tools/libxl/libxl_utils.c | 2 - tools/libxl/libxlu_cfg.c | 2 - tools/libxl/xl_cmdimpl.c | 5 ---- tools/misc/gtraceview.c | 3 -- tools/python/xen/lowlevel/checkpoint/libcheckpoint.c | 6 +---- tools/python/xen/lowlevel/netlink/libnetlink.c | 3 -- tools/xcutils/xc_restore.c | 3 -- tools/xenstat/xentop/xentop.c | 8 +------ tools/xenstore/xenstored_core.c | 20 ++++++++++++++----- xen/arch/x86/acpi/cpu_idle.c | 2 - xen/arch/x86/cpu/amd.c | 3 -- xen/arch/x86/cpu/intel.c | 3 -- xen/arch/x86/cpu/intel_cacheinfo.c | 7 ------ xen/arch/x86/cpu/mcheck/mce.c | 15 +++----------- xen/arch/x86/cpu/mcheck/vmce.c | 2 - xen/arch/x86/hvm/emulate.c | 3 -- xen/arch/x86/hvm/hvm.c | 5 +--- xen/arch/x86/hvm/viridian.c | 5 ---- xen/arch/x86/microcode_amd.c | 3 -- xen/arch/x86/mm.c | 2 - xen/arch/x86/mm/mem_sharing.c | 2 - xen/arch/x86/mm/p2m-pod.c | 3 -- xen/arch/x86/mm/p2m.c | 2 - xen/arch/x86/mm/shadow/multi.c | 4 +-- xen/arch/x86/msi.c | 9 -------- xen/arch/x86/time.c | 5 ++-- xen/arch/x86/x86_64/mm.c | 4 --- xen/common/cpupool.c | 2 - xen/common/grant_table.c | 2 - xen/common/kexec.c | 2 - xen/common/sched_credit2.c | 4 --- xen/common/tmem.c | 4 +-- xen/common/tmem_xen.c | 4 +-- xen/common/unlzo.c | 3 -- xen/drivers/passthrough/vtd/intremap.c | 6 ----- 43 files changed, 59 insertions(+), 123 deletions(-) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Olaf Hering
2011-May-19 19:05 UTC
[Xen-devel] [PATCH 01 of 45] gcc-4.6 compile fix: tools/libxc/xc_tmem.c
# HG changeset patch # User Olaf Hering <olaf@aepfle.de> # Date 1305824381 -7200 # Node ID f1cb18c064c9588c1f6336cc5eb73b5a5b6e874b # Parent f531ed84b0661aa6863dc86d5e5638642bc47301 gcc-4.6 compile fix: tools/libxc/xc_tmem.c xc_tmem.c: In function ''xc_tmem_restore'': xc_tmem.c:393:14: error: variable ''save_max_pools'' set but not used [-Werror=unused-but-set-variable] Signed-off-by: Olaf Hering <olaf@aepfle.de> diff -r f531ed84b066 -r f1cb18c064c9 tools/libxc/xc_tmem.c --- a/tools/libxc/xc_tmem.c Tue May 17 17:32:19 2011 +0100 +++ b/tools/libxc/xc_tmem.c Thu May 19 18:59:41 2011 +0200 @@ -390,7 +390,7 @@ static int xc_tmem_restore_new_pool( int xc_tmem_restore(xc_interface *xch, int dom, int io_fd) { - uint32_t save_max_pools, save_version; + uint32_t save_version; uint32_t this_max_pools, this_version; uint32_t pool_id; uint32_t minusone; @@ -400,7 +400,6 @@ int xc_tmem_restore(xc_interface *xch, i save_version = xc_tmem_control(xch,0,TMEMC_SAVE_GET_VERSION,dom,0,0,0,NULL); if ( save_version == -1 ) return -1; /* domain doesn''t exist */ - save_max_pools = xc_tmem_control(xch,0,TMEMC_SAVE_GET_MAXPOOLS,0,0,0,0,NULL); if ( read_exact(io_fd, &this_version, sizeof(this_version)) ) return -1; if ( read_exact(io_fd, &this_max_pools, sizeof(this_max_pools)) ) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Olaf Hering
2011-May-19 19:05 UTC
[Xen-devel] [PATCH 02 of 45] gcc-4.6 compile fix: tools/libxc/xc_domain_restore.c
# HG changeset patch # User Olaf Hering <olaf@aepfle.de> # Date 1305824382 -7200 # Node ID 9c492ce99bbe24e1b4bbe43c754f136ac19a372f # Parent f1cb18c064c9588c1f6336cc5eb73b5a5b6e874b gcc-4.6 compile fix: tools/libxc/xc_domain_restore.c xc_domain_restore.c: In function ''xc_domain_restore'': xc_domain_restore.c:1090:18: error: variable ''prev_pc'' set but not used [-Werror=unused-but-set-variable] Signed-off-by: Olaf Hering <olaf@aepfle.de> diff -r f1cb18c064c9 -r 9c492ce99bbe tools/libxc/xc_domain_restore.c --- a/tools/libxc/xc_domain_restore.c Thu May 19 18:59:41 2011 +0200 +++ b/tools/libxc/xc_domain_restore.c Thu May 19 18:59:42 2011 +0200 @@ -1087,7 +1087,6 @@ int xc_domain_restore(xc_interface *xch, int vcpuextstate = 0; uint32_t vcpuextstate_size = 0; unsigned long mfn, pfn; - unsigned int prev_pc; int nraces = 0; /* The new domain''s shared-info frame number. */ @@ -1255,7 +1254,6 @@ int xc_domain_restore(xc_interface *xch, * Now simply read each saved frame into its new machine frame. * We uncanonicalise page tables as we go. */ - prev_pc = 0; n = m = 0; loadpages: _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Olaf Hering
2011-May-19 19:05 UTC
[Xen-devel] [PATCH 03 of 45] gcc-4.6 compile fix: tools/xenstore/xenstored_core.c
# HG changeset patch # User Olaf Hering <olaf@aepfle.de> # Date 1305824384 -7200 # Node ID cb0ed92e451d06789cb1a0ba14967bda3a7a5bcb # Parent 9c492ce99bbe24e1b4bbe43c754f136ac19a372f gcc-4.6 compile fix: tools/xenstore/xenstored_core.c xenstored_core.c: In function ''trace'': xenstored_core.c:133:11: error: variable ''dummy'' set but not used [-Werror=unused-but-set-variable] xenstored_core.c: In function ''trigger_reopen_log'': xenstored_core.c:203:6: error: variable ''dummy'' set but not used [-Werror=unused-but-set-variable] Signed-off-by: Olaf Hering <olaf@aepfle.de> diff -r 9c492ce99bbe -r cb0ed92e451d tools/xenstore/xenstored_core.c --- a/tools/xenstore/xenstored_core.c Thu May 19 18:59:42 2011 +0200 +++ b/tools/xenstore/xenstored_core.c Thu May 19 18:59:44 2011 +0200 @@ -130,7 +130,7 @@ void trace(const char *fmt, ...) va_list arglist; char *str; char sbuf[1024]; - int ret, dummy; + int ret; if (tracefd < 0) return; @@ -141,7 +141,10 @@ void trace(const char *fmt, ...) va_end(arglist); if (ret <= 1024) { - dummy = write(tracefd, sbuf, ret); + if (write(tracefd, sbuf, ret) < 0) { + close(tracefd); + tracefd = -1; + } return; } @@ -149,7 +152,10 @@ void trace(const char *fmt, ...) va_start(arglist, fmt); str = talloc_vasprintf(NULL, fmt, arglist); va_end(arglist); - dummy = write(tracefd, str, strlen(str)); + if (write(tracefd, str, strlen(str)) < 0) { + close(tracefd); + tracefd = -1; + } talloc_free(str); } @@ -200,8 +206,12 @@ void trace_destroy(const void *data, con static void trigger_reopen_log(int signal __attribute__((unused))) { char c = ''A''; - int dummy; - dummy = write(reopen_log_pipe[1], &c, 1); + if (reopen_log_pipe[1] < 0) + return; + if (write(reopen_log_pipe[1], &c, 1) < 0) { + close(reopen_log_pipe[1]); + reopen_log_pipe[1] = -1; + } } _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Olaf Hering
2011-May-19 19:05 UTC
[Xen-devel] [PATCH 04 of 45] gcc-4.6 compile fix: tools/misc/gtraceview.c
# HG changeset patch # User Olaf Hering <olaf@aepfle.de> # Date 1305824385 -7200 # Node ID cc966312031cef3c6463c77287087a339594fe18 # Parent cb0ed92e451d06789cb1a0ba14967bda3a7a5bcb gcc-4.6 compile fix: tools/misc/gtraceview.c gtraceview.c: In function ''nr_addch'': gtraceview.c:625:9: error: variable ''y'' set but not used [-Werror=unused-but-set-variable] Signed-off-by: Olaf Hering <olaf@aepfle.de> diff -r cb0ed92e451d -r cc966312031c tools/misc/gtraceview.c --- a/tools/misc/gtraceview.c Thu May 19 18:59:44 2011 +0200 +++ b/tools/misc/gtraceview.c Thu May 19 18:59:45 2011 +0200 @@ -622,8 +622,7 @@ void crt_init(void) void nr_addch(int nr, int ch) { int i; - int y, x; - getyx(stdscr, y, x); + int x = getcurx(stdscr); for (i = 0; i < nr; i++) { if (x == COLS-1) break; _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Olaf Hering
2011-May-19 19:05 UTC
[Xen-devel] [PATCH 05 of 45] gcc-4.6 compile fix: tools/xcutils/xc_restore.c
# HG changeset patch # User Olaf Hering <olaf@aepfle.de> # Date 1305824386 -7200 # Node ID d30215ff28c8f4c02476a4d41a83e76cb2f1f6fa # Parent cc966312031cef3c6463c77287087a339594fe18 gcc-4.6 compile fix: tools/xcutils/xc_restore.c xc_restore.c: In function ''main'': xc_restore.c:22:28: error: variable ''apic'' set but not used [-Werror=unused-but-set-variable] Signed-off-by: Olaf Hering <olaf@aepfle.de> diff -r cc966312031c -r d30215ff28c8 tools/xcutils/xc_restore.c --- a/tools/xcutils/xc_restore.c Thu May 19 18:59:45 2011 +0200 +++ b/tools/xcutils/xc_restore.c Thu May 19 18:59:46 2011 +0200 @@ -19,7 +19,7 @@ int main(int argc, char **argv) { unsigned int domid, store_evtchn, console_evtchn; - unsigned int hvm, pae, apic; + unsigned int hvm, pae; xc_interface *xch; int io_fd, ret; int superpages; @@ -39,7 +39,6 @@ main(int argc, char **argv) console_evtchn = atoi(argv[4]); hvm = atoi(argv[5]); pae = atoi(argv[6]); - apic = atoi(argv[7]); if ( argc == 9 ) superpages = atoi(argv[8]); else _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Olaf Hering
2011-May-19 19:05 UTC
[Xen-devel] [PATCH 06 of 45] gcc-4.6 compile fix: tools/firmware/rombios/32bit/tcgbios/tcgbios.c
# HG changeset patch # User Olaf Hering <olaf@aepfle.de> # Date 1305824387 -7200 # Node ID 6f3f57bd82e41d6f3036d6686ca24dd2bb01739d # Parent d30215ff28c8f4c02476a4d41a83e76cb2f1f6fa gcc-4.6 compile fix: tools/firmware/rombios/32bit/tcgbios/tcgbios.c tcgbios.c: In function ''HashLogEvent32'': tcgbios.c:1067:11: error: variable ''logdatalen'' set but not used [-Werror=unused-but-set-variable] Signed-off-by: Olaf Hering <olaf@aepfle.de> diff -r d30215ff28c8 -r 6f3f57bd82e4 tools/firmware/rombios/32bit/tcgbios/tcgbios.c --- a/tools/firmware/rombios/32bit/tcgbios/tcgbios.c Thu May 19 18:59:46 2011 +0200 +++ b/tools/firmware/rombios/32bit/tcgbios/tcgbios.c Thu May 19 18:59:47 2011 +0200 @@ -1064,7 +1064,6 @@ uint32_t HashLogEvent32(struct hlei *hle uint32_t rc = 0; uint16_t size; uint32_t logdataptr; - uint32_t logdatalen; uint32_t hashdataptr; uint32_t hashdatalen; @@ -1084,7 +1083,6 @@ uint32_t HashLogEvent32(struct hlei *hle if (rc == 0) { struct pcpes *pcpes; logdataptr = hlei->logdataptr; - logdatalen = hlei->logdatalen; pcpes = (struct pcpes *)logdataptr; if (pcpes->pcrindex != hlei->pcrindex) { rc = (TCG_PC_TPMERROR | _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Olaf Hering
2011-May-19 19:05 UTC
[Xen-devel] [PATCH 07 of 45] gcc-4.6 compile fix: tools/console/client/main.c
# HG changeset patch # User Olaf Hering <olaf@aepfle.de> # Date 1305824388 -7200 # Node ID 82703d3639a6dd4c31be22fe449029c5e7f6a2e3 # Parent 6f3f57bd82e41d6f3036d6686ca24dd2bb01739d gcc-4.6 compile fix: tools/console/client/main.c client/main.c: In function ''main'': client/main.c:280:12: error: variable ''xsfd'' set but not used [-Werror=unused-but-set-variable] Signed-off-by: Olaf Hering <olaf@aepfle.de> diff -r 6f3f57bd82e4 -r 82703d3639a6 tools/console/client/main.c --- a/tools/console/client/main.c Thu May 19 18:59:47 2011 +0200 +++ b/tools/console/client/main.c Thu May 19 18:59:48 2011 +0200 @@ -277,7 +277,7 @@ int main(int argc, char **argv) }; char *dom_path = NULL, *path = NULL; - int spty, xsfd; + int spty; struct xs_handle *xs; char *end; console_type type = CONSOLE_INVAL; @@ -371,7 +371,6 @@ int main(int argc, char **argv) /* Set a watch on this domain''s console pty */ if (!xs_watch(xs, path, "")) err(errno, "Can''t set watch for console pty"); - xsfd = xs_fileno(xs); /* Wait a little bit for tty to appear. There is a race condition that occurs after xend creates a domain. This code _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Olaf Hering
2011-May-19 19:05 UTC
[Xen-devel] [PATCH 08 of 45] gcc-4.6 compile fix: tools/xenstat/xentop/xentop.c
# HG changeset patch # User Olaf Hering <olaf@aepfle.de> # Date 1305824390 -7200 # Node ID c6ae952c7f405323de3e07f74d92245aac81b8ed # Parent 82703d3639a6dd4c31be22fe449029c5e7f6a2e3 gcc-4.6 compile fix: tools/xenstat/xentop/xentop.c xentop.c: In function ''current_row'': xentop.c:275:9: error: variable ''x'' set but not used [-Werror=unused-but-set-variable] xentop.c: In function ''lines'': xentop.c:283:9: error: variable ''x'' set but not used [-Werror=unused-but-set-variable] Signed-off-by: Olaf Hering <olaf@aepfle.de> diff -r 82703d3639a6 -r c6ae952c7f40 tools/xenstat/xentop/xentop.c --- a/tools/xenstat/xentop/xentop.c Thu May 19 18:59:48 2011 +0200 +++ b/tools/xenstat/xentop/xentop.c Thu May 19 18:59:50 2011 +0200 @@ -272,17 +272,13 @@ static void fail(const char *str) /* Return the row containing the cursor. */ static int current_row(void) { - int y, x; - getyx(stdscr, y, x); - return y; + return getcury(stdscr); } /* Return the number of lines on the screen. */ static int lines(void) { - int y, x; - getmaxyx(stdscr, y, x); - return y; + return getmaxy(stdscr); } /* printf-style print function which calls printw, but only if the cursor is _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Olaf Hering
2011-May-19 19:05 UTC
[Xen-devel] [PATCH 09 of 45] gcc-4.6 compile fix: tools/libxl/xl_cmdimpl.c
# HG changeset patch # User Olaf Hering <olaf@aepfle.de> # Date 1305824391 -7200 # Node ID aa460b276cea9b5b3b8d0d08411c674deda44772 # Parent c6ae952c7f405323de3e07f74d92245aac81b8ed gcc-4.6 compile fix: tools/libxl/xl_cmdimpl.c xl_cmdimpl.c: In function ''main_migrate'': xl_cmdimpl.c:2880:29: error: variable ''monitor'' set but not used [-Werror=unused-but-set-variable] xl_cmdimpl.c: In function ''main_cpupoollist'': xl_cmdimpl.c:4868:9: error: variable ''opt_long'' set but not used [-Werror=unused-but-set-variable] Signed-off-by: Olaf Hering <olaf@aepfle.de> diff -r c6ae952c7f40 -r aa460b276cea tools/libxl/xl_cmdimpl.c --- a/tools/libxl/xl_cmdimpl.c Thu May 19 18:59:50 2011 +0200 +++ b/tools/libxl/xl_cmdimpl.c Thu May 19 18:59:51 2011 +0200 @@ -2877,7 +2877,7 @@ int main_migrate(int argc, char **argv) const char *ssh_command = "ssh"; char *rune = NULL; char *host; - int opt, daemonize = 1, monitor = 1, debug = 0; + int opt, daemonize = 1, debug = 0; while ((opt = def_getopt(argc, argv, "FC:s:ed", "migrate", 2)) != -1) { switch (opt) { @@ -2894,7 +2894,6 @@ int main_migrate(int argc, char **argv) break; case ''e'': daemonize = 0; - monitor = 0; break; case ''d'': debug = 1; @@ -4865,7 +4864,6 @@ int main_cpupoollist(int argc, char **ar {"cpus", 0, 0, ''c''}, {0, 0, 0, 0} }; - int opt_long = 0; int opt_cpus = 0; const char *pool = NULL; libxl_cpupoolinfo *poolinfo; @@ -4884,7 +4882,6 @@ int main_cpupoollist(int argc, char **ar help("cpupool-list"); return 0; case ''l'': - opt_long = 1; break; case ''c'': opt_cpus = 1; _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Olaf Hering
2011-May-19 19:05 UTC
[Xen-devel] [PATCH 10 of 45] gcc-4.6 compile fix: tools/libxl/libxlu_cfg.c
# HG changeset patch # User Olaf Hering <olaf@aepfle.de> # Date 1305824392 -7200 # Node ID e4c2a83d9d302786e396d5a15278454905a261a1 # Parent aa460b276cea9b5b3b8d0d08411c674deda44772 gcc-4.6 compile fix: tools/libxl/libxlu_cfg.c libxlu_cfg.c: In function ''xlu__cfgl_dequote'': libxlu_cfg.c:368:17: error: variable ''val'' set but not used [-Werror=unused-but-set-variable] libxlu_cfg.c:370:17: error: variable ''val'' set but not used [-Werror=unused-but-set-variable] Signed-off-by: Olaf Hering <olaf@aepfle.de> diff -r aa460b276cea -r e4c2a83d9d30 tools/libxl/libxlu_cfg.c --- a/tools/libxl/libxlu_cfg.c Thu May 19 18:59:51 2011 +0200 +++ b/tools/libxl/libxlu_cfg.c Thu May 19 18:59:52 2011 +0200 @@ -349,7 +349,7 @@ char *xlu__cfgl_dequote(CfgParseContext #define NUMERIC_CHAR(minlen,maxlen,base,basetext) do{ \ char numbuf[(maxlen)+1], *ep; \ - unsigned long val; \ + unsigned long val __attribute__((unused)); \ \ strncpy(numbuf,p,(maxlen)); \ numbuf[(maxlen)]= 0; \ _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Olaf Hering
2011-May-19 19:05 UTC
[Xen-devel] [PATCH 11 of 45] gcc-4.6 compile fix: tools/libxl/libxl.c
# HG changeset patch # User Olaf Hering <olaf@aepfle.de> # Date 1305824393 -7200 # Node ID da1b3aa3abf442694ba388968cc59b582ef3d8c9 # Parent e4c2a83d9d302786e396d5a15278454905a261a1 gcc-4.6 compile fix: tools/libxl/libxl.c libxl.c: In function ''libxl_domain_resume'': libxl.c:242:9: error: variable ''rc'' set but not used [-Werror=unused-but-set-variable] libxl.c: In function ''libxl_list_nics'': libxl.c:1339:17: error: variable ''list'' set but not used [-Werror=unused-but-set-variable] Signed-off-by: Olaf Hering <olaf@aepfle.de> diff -r e4c2a83d9d30 -r da1b3aa3abf4 tools/libxl/libxl.c --- a/tools/libxl/libxl.c Thu May 19 18:59:52 2011 +0200 +++ b/tools/libxl/libxl.c Thu May 19 18:59:53 2011 +0200 @@ -262,7 +262,7 @@ int libxl_domain_resume(libxl_ctx *ctx, } out: libxl__free_all(&gc); - return 0; + return rc; } /* @@ -1336,7 +1336,7 @@ libxl_nicinfo *libxl_list_nics(libxl_ctx { libxl__gc gc = LIBXL_INIT_GC(ctx); char *dompath, *nic_path_fe; - char **l, **list; + char **l; char *val, *tok; unsigned int nb_nics, i; libxl_nicinfo *res, *nics; @@ -1344,7 +1344,7 @@ libxl_nicinfo *libxl_list_nics(libxl_ctx dompath = libxl__xs_get_dompath(&gc, domid); if (!dompath) goto err; - list = l = libxl__xs_directory(&gc, XBT_NULL, + l = libxl__xs_directory(&gc, XBT_NULL, libxl__sprintf(&gc, "%s/device/vif", dompath), &nb_nics); if (!l) goto err; _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Olaf Hering
2011-May-19 19:05 UTC
[Xen-devel] [PATCH 12 of 45] gcc-4.6 compile fix: tools/libxl/libxl_pci.c
# HG changeset patch # User Olaf Hering <olaf@aepfle.de> # Date 1305824394 -7200 # Node ID a096a1358c6c4701d44f1467ccc36cf422ffb6a7 # Parent da1b3aa3abf442694ba388968cc59b582ef3d8c9 gcc-4.6 compile fix: tools/libxl/libxl_pci.c libxl_pci.c: In function ''libxl__create_pci_backend'': libxl_pci.c:230:9: error: variable ''ret'' set but not used [-Werror=unused-but-set-variable] Signed-off-by: Olaf Hering <olaf@aepfle.de> diff -r da1b3aa3abf4 -r a096a1358c6c tools/libxl/libxl_pci.c --- a/tools/libxl/libxl_pci.c Thu May 19 18:59:53 2011 +0200 +++ b/tools/libxl/libxl_pci.c Thu May 19 18:59:54 2011 +0200 @@ -269,7 +269,7 @@ out: flexarray_free(back); if (front) flexarray_free(front); - return 0; + return ret; } static int libxl__device_pci_add_xenstore(libxl__gc *gc, uint32_t domid, libxl_device_pci *pcidev, int starting) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Olaf Hering
2011-May-19 19:05 UTC
[Xen-devel] [PATCH 13 of 45] gcc-4.6 compile fix: tools/libxl/libxl_dom.c
# HG changeset patch # User Olaf Hering <olaf@aepfle.de> # Date 1305824396 -7200 # Node ID 2a87e67af2c83fe17f3860afd85b9ae7413317cb # Parent a096a1358c6c4701d44f1467ccc36cf422ffb6a7 gcc-4.6 compile fix: tools/libxl/libxl_dom.c libxl_dom.c: In function ''libxl__build_hvm'': libxl_dom.c:284:14: error: variable ''rc'' set but not used [-Werror=unused-but-set-variable] Signed-off-by: Olaf Hering <olaf@aepfle.de> diff -r a096a1358c6c -r 2a87e67af2c8 tools/libxl/libxl_dom.c --- a/tools/libxl/libxl_dom.c Thu May 19 18:59:54 2011 +0200 +++ b/tools/libxl/libxl_dom.c Thu May 19 18:59:56 2011 +0200 @@ -281,7 +281,7 @@ int libxl__build_hvm(libxl__gc *gc, uint libxl_domain_build_info *info, libxl__domain_build_state *state) { libxl_ctx *ctx = libxl__gc_owner(gc); - int ret, rc = ERROR_INVAL; + int ret, rc; rc = ERROR_FAIL; ret = xc_hvm_build_target_mem( @@ -302,7 +302,7 @@ int libxl__build_hvm(libxl__gc *gc, uint } rc = 0; out: - return 0; + return rc; } int libxl__domain_restore_common(libxl__gc *gc, uint32_t domid, _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Olaf Hering
2011-May-19 19:05 UTC
[Xen-devel] [PATCH 14 of 45] gcc-4.6 compile fix: tools/libxl/libxl_utils.c
# HG changeset patch # User Olaf Hering <olaf@aepfle.de> # Date 1305824397 -7200 # Node ID 14b06ce705e33d9337f9b45a67d25fcc5bead3dc # Parent 2a87e67af2c83fe17f3860afd85b9ae7413317cb gcc-4.6 compile fix: tools/libxl/libxl_utils.c libxl_utils.c: In function ''libxl_devid_to_device_disk'': libxl_utils.c:535:18: error: variable ''devid_n'' set but not used [-Werror=unused-but-set-variable] Signed-off-by: Olaf Hering <olaf@aepfle.de> diff -r 2a87e67af2c8 -r 14b06ce705e3 tools/libxl/libxl_utils.c --- a/tools/libxl/libxl_utils.c Thu May 19 18:59:56 2011 +0200 +++ b/tools/libxl/libxl_utils.c Thu May 19 18:59:57 2011 +0200 @@ -532,7 +532,7 @@ int libxl_devid_to_device_disk(libxl_ctx libxl__gc gc = LIBXL_INIT_GC(ctx); char *endptr, *val; char *dompath, *diskpath, *be_path; - unsigned int devid_n; + unsigned int devid_n __attribute__((unused)); int rc = ERROR_INVAL; devid_n = strtoul(devid, &endptr, 10); _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Olaf Hering
2011-May-19 19:05 UTC
[Xen-devel] [PATCH 15 of 45] gcc-4.6 compile fix: tools/debugger/gdbsx/gx/gx_comm.c
# HG changeset patch # User Olaf Hering <olaf@aepfle.de> # Date 1305824398 -7200 # Node ID b1d2f51888e912c2917867f0d23b6b090a95dc2d # Parent 14b06ce705e33d9337f9b45a67d25fcc5bead3dc gcc-4.6 compile fix: tools/debugger/gdbsx/gx/gx_comm.c gx_comm.c: In function ''readchar'': gx_comm.c:166:14: error: variable ''ll'' set but not used [-Werror=unused-but-set-variable] Signed-off-by: Olaf Hering <olaf@aepfle.de> diff -r 14b06ce705e3 -r b1d2f51888e9 tools/debugger/gdbsx/gx/gx_comm.c --- a/tools/debugger/gdbsx/gx/gx_comm.c Thu May 19 18:59:57 2011 +0200 +++ b/tools/debugger/gdbsx/gx/gx_comm.c Thu May 19 18:59:58 2011 +0200 @@ -163,13 +163,11 @@ readchar(void) static char buf[BUFSIZ]; static int bufcnt = 0; static char *bufp; - uint64_t ll; if (bufcnt-- > 0) return *bufp++ & 0x7f; bufcnt = read(remote_fd, buf, sizeof (buf)); - ll = *(uint64_t *)buf; if (bufcnt <= 0) { if (bufcnt == 0) gxprt("readchar: Got EOF\n"); _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Olaf Hering
2011-May-19 19:05 UTC
[Xen-devel] [PATCH 16 of 45] gcc-4.6 compile fix: tools/python/xen/lowlevel/checkpoint/libcheckpoint.c
# HG changeset patch # User Olaf Hering <olaf@aepfle.de> # Date 1305824399 -7200 # Node ID 166afe5e14106a064c5d63f6a8bc0b87817270bb # Parent b1d2f51888e912c2917867f0d23b6b090a95dc2d gcc-4.6 compile fix: tools/python/xen/lowlevel/checkpoint/libcheckpoint.c xen/lowlevel/checkpoint/libcheckpoint.c: In function ''stop_suspend_thread'': xen/lowlevel/checkpoint/libcheckpoint.c:823:7: error: variable ''err'' set but not used [-Werror=unused-but-set-variable] Signed-off-by: Olaf Hering <olaf@aepfle.de> diff -r b1d2f51888e9 -r 166afe5e1410 tools/python/xen/lowlevel/checkpoint/libcheckpoint.c --- a/tools/python/xen/lowlevel/checkpoint/libcheckpoint.c Thu May 19 18:59:58 2011 +0200 +++ b/tools/python/xen/lowlevel/checkpoint/libcheckpoint.c Thu May 19 18:59:59 2011 +0200 @@ -820,12 +820,10 @@ static int create_suspend_thread(checkpo static void stop_suspend_thread(checkpoint_state* s) { - int err; - s->done = 1; - err = sem_post(&s->resumed_sem); + sem_post(&s->resumed_sem); - err = pthread_join(s->suspend_thr, NULL); + pthread_join(s->suspend_thr, NULL); s->suspend_thr = 0; } _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Olaf Hering
2011-May-19 19:05 UTC
[Xen-devel] [PATCH 17 of 45] gcc-4.6 compile fix: tools/python/xen/lowlevel/netlink/libnetlink.c
# HG changeset patch # User Olaf Hering <olaf@aepfle.de> # Date 1305824400 -7200 # Node ID 0ef116beb380f5a8f2bef7825c0f5f450520e923 # Parent 166afe5e14106a064c5d63f6a8bc0b87817270bb gcc-4.6 compile fix: tools/python/xen/lowlevel/netlink/libnetlink.c xen/lowlevel/netlink/libnetlink.c: In function ''rtnl_from_file'': xen/lowlevel/netlink/libnetlink.c:436:30: error: variable ''type'' set but not used [-Werror=unused-but-set-variable] Signed-off-by: Olaf Hering <olaf@aepfle.de> diff -r 166afe5e1410 -r 0ef116beb380 tools/python/xen/lowlevel/netlink/libnetlink.c --- a/tools/python/xen/lowlevel/netlink/libnetlink.c Thu May 19 18:59:59 2011 +0200 +++ b/tools/python/xen/lowlevel/netlink/libnetlink.c Thu May 19 19:00:00 2011 +0200 @@ -433,7 +433,7 @@ int rtnl_from_file(FILE *rtnl, rtnl_filt nladdr.nl_groups = 0; while (1) { - int err, len, type; + int err, len; int l; status = fread(&buf, 1, sizeof(*h), rtnl); @@ -448,7 +448,6 @@ int rtnl_from_file(FILE *rtnl, rtnl_filt return 0; len = h->nlmsg_len; - type= h->nlmsg_type; l = len - sizeof(*h); if (l<0 || len>sizeof(buf)) { _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Olaf Hering
2011-May-19 19:05 UTC
[Xen-devel] [PATCH 18 of 45] gcc-4.6 compile fix: xen/common/cpupool.c
# HG changeset patch # User Olaf Hering <olaf@aepfle.de> # Date 1305824402 -7200 # Node ID 982cc1330a16cc27e3c1f16b4ee9874340ec01ed # Parent 0ef116beb380f5a8f2bef7825c0f5f450520e923 gcc-4.6 compile fix: xen/common/cpupool.c cpupool.c: In function ''cpupool_add_domain'': cpupool.c:359:9: error: variable ''n_dom'' set but not used [-Werror=unused-but-set-variable] cpupool.c: In function ''cpupool_rm_domain'': cpupool.c:384:9: error: variable ''n_dom'' set but not used [-Werror=unused-but-set-variable] cpupool.c:383:9: error: variable ''cpupool_id'' set but not used [-Werror=unused-but-set-variable] Signed-off-by: Olaf Hering <olaf@aepfle.de> diff -r 0ef116beb380 -r 982cc1330a16 xen/common/cpupool.c --- a/xen/common/cpupool.c Thu May 19 19:00:00 2011 +0200 +++ b/xen/common/cpupool.c Thu May 19 19:00:02 2011 +0200 @@ -35,7 +35,7 @@ static DEFINE_SPINLOCK(cpupool_lock); DEFINE_PER_CPU(struct cpupool *, cpupool); -#define cpupool_dprintk(x...) ((void)0) +#define cpupool_dprintk(fmt, args...) { if (0) printk(fmt, ##args); } static struct cpupool *alloc_cpupool_struct(void) { _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Olaf Hering
2011-May-19 19:05 UTC
[Xen-devel] [PATCH 19 of 45] gcc-4.6 compile fix: xen/common/grant_table.c
# HG changeset patch # User Olaf Hering <olaf@aepfle.de> # Date 1305824403 -7200 # Node ID 5516ec1f996e50d65051441e98674ee8cb799a48 # Parent 982cc1330a16cc27e3c1f16b4ee9874340ec01ed gcc-4.6 compile fix: xen/common/grant_table.c grant_table.c: In function ''__gnttab_unmap_common'': grant_table.c:768:22: error: variable ''old_pin'' set but not used [-Werror=unused-but-set-variable] Signed-off-by: Olaf Hering <olaf@aepfle.de> diff -r 982cc1330a16 -r 5516ec1f996e xen/common/grant_table.c --- a/xen/common/grant_table.c Thu May 19 19:00:02 2011 +0200 +++ b/xen/common/grant_table.c Thu May 19 19:00:03 2011 +0200 @@ -765,7 +765,6 @@ __gnttab_unmap_common( struct domain *ld, *rd; struct active_grant_entry *act; s16 rc = 0; - u32 old_pin; ld = current->domain; @@ -811,7 +810,6 @@ __gnttab_unmap_common( spin_lock(&rd->grant_table->lock); act = &active_entry(rd->grant_table, op->map->ref); - old_pin = act->pin; if ( op->frame == 0 ) { _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Olaf Hering
2011-May-19 19:05 UTC
[Xen-devel] [PATCH 20 of 45] gcc-4.6 compile fix: xen/common/kexec.c
# HG changeset patch # User Olaf Hering <olaf@aepfle.de> # Date 1305824404 -7200 # Node ID 3317bd7aa9150894d21538700702ddefc19a5b50 # Parent 5516ec1f996e50d65051441e98674ee8cb799a48 gcc-4.6 compile fix: xen/common/kexec.c kexec.c: In function ''kexec_exec'': kexec.c:566:25: error: variable ''ret'' set but not used [-Werror=unused-but-set-variable] Signed-off-by: Olaf Hering <olaf@aepfle.de> diff -r 5516ec1f996e -r 3317bd7aa915 xen/common/kexec.c --- a/xen/common/kexec.c Thu May 19 19:00:03 2011 +0200 +++ b/xen/common/kexec.c Thu May 19 19:00:04 2011 +0200 @@ -588,7 +588,7 @@ static int kexec_exec(XEN_GUEST_HANDLE(v break; } - return -EINVAL; /* never reached */ + return ret; /* never reached */ } int do_kexec_op_internal(unsigned long op, XEN_GUEST_HANDLE(void) uarg, _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Olaf Hering
2011-May-19 19:05 UTC
[Xen-devel] [PATCH 21 of 45] gcc-4.6 compile fix: xen/common/sched_credit2.c
# HG changeset patch # User Olaf Hering <olaf@aepfle.de> # Date 1305824405 -7200 # Node ID 215451b4be8e001ccf816decb171ef0c50373de5 # Parent 3317bd7aa9150894d21538700702ddefc19a5b50 gcc-4.6 compile fix: xen/common/sched_credit2.c sched_credit2.c: In function ''init_pcpu'': sched_credit2.c:1883:14: error: variable ''old_rqi'' set but not used [-Werror=unused-but-set-variable] Signed-off-by: Olaf Hering <olaf@aepfle.de> diff -r 3317bd7aa915 -r 215451b4be8e xen/common/sched_credit2.c --- a/xen/common/sched_credit2.c Thu May 19 19:00:04 2011 +0200 +++ b/xen/common/sched_credit2.c Thu May 19 19:00:05 2011 +0200 @@ -1880,7 +1880,7 @@ static void deactivate_runqueue(struct c static void init_pcpu(const struct scheduler *ops, int cpu) { - int rqi, old_rqi, flags; + int rqi, flags; struct csched_private *prv = CSCHED_PRIV(ops); struct csched_runqueue_data *rqd; spinlock_t *old_lock; @@ -1894,8 +1894,6 @@ static void init_pcpu(const struct sched return; } - old_rqi = prv->runq_map[cpu]; - /* Figure out which runqueue to put it in */ rqi = 0; _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Olaf Hering
2011-May-19 19:05 UTC
[Xen-devel] [PATCH 22 of 45] gcc-4.6 compile fix: xen/common/unlzo.c
# HG changeset patch # User Olaf Hering <olaf@aepfle.de> # Date 1305824406 -7200 # Node ID 0f8146a56c8e2349f7fbc091e843f72974643106 # Parent 215451b4be8e001ccf816decb171ef0c50373de5 gcc-4.6 compile fix: xen/common/unlzo.c unlzo.c: In function ''parse_header'': unlzo.c:71:5: error: variable ''level'' set but not used [-Werror=unused-but-set-variable] Signed-off-by: Olaf Hering <olaf@aepfle.de> diff -r 215451b4be8e -r 0f8146a56c8e xen/common/unlzo.c --- a/xen/common/unlzo.c Thu May 19 19:00:05 2011 +0200 +++ b/xen/common/unlzo.c Thu May 19 19:00:06 2011 +0200 @@ -68,7 +68,6 @@ static int INIT parse_header(u8 *input, { int l; u8 *parse = input; - u8 level = 0; u16 version; /* read magic: 9 first bits */ @@ -82,7 +81,7 @@ static int INIT parse_header(u8 *input, version = get_unaligned_be16(parse); parse += 7; if (version >= 0x0940) - level = *parse++; + parse += 1; /* skip level */ if (get_unaligned_be32(parse) & HEADER_HAS_FILTER) parse += 8; /* flags + filter info */ else _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Olaf Hering
2011-May-19 19:05 UTC
[Xen-devel] [PATCH 23 of 45] gcc-4.6 compile fix: xen/drivers/passthrough/vtd/intremap.c
# HG changeset patch # User Olaf Hering <olaf@aepfle.de> # Date 1305824408 -7200 # Node ID 452ca03a71814742f94213554399f6cfbf350046 # Parent 0f8146a56c8e2349f7fbc091e843f72974643106 gcc-4.6 compile fix: xen/drivers/passthrough/vtd/intremap.c intremap.c: In function ''io_apic_read_remap_rte'': intremap.c:370:39: error: variable ''remap_rte'' set but not used [-Werror=unused-but-set-variable] intremap.c: In function ''iommu_enable_x2apic_IR'': intremap.c:853:25: error: variable ''qi_ctrl'' set but not used [-Werror=unused-but-set-variable] Signed-off-by: Olaf Hering <olaf@aepfle.de> diff -r 0f8146a56c8e -r 452ca03a7181 xen/drivers/passthrough/vtd/intremap.c --- a/xen/drivers/passthrough/vtd/intremap.c Thu May 19 19:00:06 2011 +0200 +++ b/xen/drivers/passthrough/vtd/intremap.c Thu May 19 19:00:08 2011 +0200 @@ -367,7 +367,6 @@ unsigned int io_apic_read_remap_rte( unsigned int ioapic_pin = (reg - 0x10) / 2; int index; struct IO_xAPIC_route_entry old_rte = { 0 }; - struct IO_APIC_route_remap_entry *remap_rte; int rte_upper = (reg & 1) ? 1 : 0; struct iommu *iommu = ioapic_to_iommu(IO_APIC_ID(apic)); struct ir_ctrl *ir_ctrl = iommu_ir_ctrl(iommu); @@ -389,8 +388,6 @@ unsigned int io_apic_read_remap_rte( *IO_APIC_BASE(apic) = reg + 1; *(((u32 *)&old_rte) + 1) = *(IO_APIC_BASE(apic)+4); - remap_rte = (struct IO_APIC_route_remap_entry *) &old_rte; - if ( remap_entry_to_ioapic_rte(iommu, index, &old_rte) ) { *IO_APIC_BASE(apic) = rte_upper ? (reg + 1) : reg; @@ -850,10 +847,7 @@ int iommu_enable_x2apic_IR(void) for_each_drhd_unit ( drhd ) { - struct qi_ctrl *qi_ctrl = NULL; - iommu = drhd->iommu; - qi_ctrl = iommu_qi_ctrl(iommu); /* Clear previous faults */ clear_fault_bits(iommu); _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Olaf Hering
2011-May-19 19:05 UTC
[Xen-devel] [PATCH 24 of 45] gcc-4.6 compile fix: xen/arch/x86/msi.c
# HG changeset patch # User Olaf Hering <olaf@aepfle.de> # Date 1305824409 -7200 # Node ID d657cd6182d517b8b5e0fffb0f34ea451f49c916 # Parent 452ca03a71814742f94213554399f6cfbf350046 gcc-4.6 compile fix: xen/arch/x86/msi.c msi.c: In function ''__pci_disable_msi'': msi.c:749:9: error: variable ''control'' set but not used [-Werror=unused-but-set-variable] (Is this a dummy read before doing the disable?) Signed-off-by: Olaf Hering <olaf@aepfle.de> diff -r 452ca03a7181 -r d657cd6182d5 xen/arch/x86/msi.c --- a/xen/arch/x86/msi.c Thu May 19 19:00:08 2011 +0200 +++ b/xen/arch/x86/msi.c Thu May 19 19:00:09 2011 +0200 @@ -745,17 +745,8 @@ static int __pci_enable_msi(struct msi_i static void __pci_disable_msi(struct msi_desc *entry) { struct pci_dev *dev; - int pos; - u16 control; - u8 bus, slot, func; dev = entry->dev; - bus = dev->bus; - slot = PCI_SLOT(dev->devfn); - func = PCI_FUNC(dev->devfn); - - pos = pci_find_cap_offset(bus, slot, func, PCI_CAP_ID_MSI); - control = pci_conf_read16(bus, slot, func, msi_control_reg(pos)); msi_set_enable(dev, 0); BUG_ON(list_empty(&dev->msi_list)); _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Olaf Hering
2011-May-19 19:05 UTC
[Xen-devel] [PATCH 25 of 45] gcc-4.6 compile fix: xen/arch/x86/microcode_amd.c
# HG changeset patch # User Olaf Hering <olaf@aepfle.de> # Date 1305824410 -7200 # Node ID a7329b4e30a3c5db1ec52c9d331f13187927d3bb # Parent d657cd6182d517b8b5e0fffb0f34ea451f49c916 gcc-4.6 compile fix: xen/arch/x86/microcode_amd.c microcode_amd.c: In function ''get_next_ucode_from_buffer_amd'': microcode_amd.c:167:34: error: variable ''mc_header'' set but not used [-Werror=unused-but-set-variable] Signed-off-by: Olaf Hering <olaf@aepfle.de> diff -r d657cd6182d5 -r a7329b4e30a3 xen/arch/x86/microcode_amd.c --- a/xen/arch/x86/microcode_amd.c Thu May 19 19:00:09 2011 +0200 +++ b/xen/arch/x86/microcode_amd.c Thu May 19 19:00:10 2011 +0200 @@ -164,7 +164,6 @@ static int apply_microcode(int cpu) static int get_next_ucode_from_buffer_amd(void *mc, const void *buf, size_t size, unsigned long *offset) { - struct microcode_header_amd *mc_header; size_t total_size; const uint8_t *bufp = buf; unsigned long off; @@ -182,8 +181,6 @@ static int get_next_ucode_from_buffer_am return -EINVAL; } - mc_header = (struct microcode_header_amd *)(&bufp[off+8]); - total_size = (unsigned long) (bufp[off+4] + (bufp[off+5] << 8)); printk(KERN_INFO "microcode: size %lu, total_size %lu, offset %ld\n", _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Olaf Hering
2011-May-19 19:05 UTC
[Xen-devel] [PATCH 26 of 45] gcc-4.6 compile fix: xen/arch/x86/time.c
# HG changeset patch # User Olaf Hering <olaf@aepfle.de> # Date 1305824411 -7200 # Node ID c8f5b4743f9a91dc1e879d35f8f2d4b981f0963d # Parent a7329b4e30a3c5db1ec52c9d331f13187927d3bb gcc-4.6 compile fix: xen/arch/x86/time.c time.c: In function ''local_time_calibration'': time.c:1007:14: error: variable ''prev_local_stime'' set but not used [-Werror=unused-but-set-variable] Signed-off-by: Olaf Hering <olaf@aepfle.de> diff -r a7329b4e30a3 -r c8f5b4743f9a xen/arch/x86/time.c --- a/xen/arch/x86/time.c Thu May 19 19:00:10 2011 +0200 +++ b/xen/arch/x86/time.c Thu May 19 19:00:11 2011 +0200 @@ -1052,14 +1052,15 @@ static void local_time_calibration(void) curr_master_stime = c->stime_master_stamp; local_irq_enable(); -#if 0 + if ( 0 ) + { printk("PRE%d: tsc=%"PRIu64" stime=%"PRIu64" master=%"PRIu64"\n", smp_processor_id(), prev_tsc, prev_local_stime, prev_master_stime); printk("CUR%d: tsc=%"PRIu64" stime=%"PRIu64" master=%"PRIu64 " -> %"PRId64"\n", smp_processor_id(), curr_tsc, curr_local_stime, curr_master_stime, curr_master_stime - curr_local_stime); -#endif + } /* Local time warps forward if it lags behind master time. */ if ( curr_local_stime < curr_master_stime ) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Olaf Hering
2011-May-19 19:05 UTC
[Xen-devel] [PATCH 27 of 45] gcc-4.6 compile fix: xen/arch/x86/acpi/cpu_idle.c
# HG changeset patch # User Olaf Hering <olaf@aepfle.de> # Date 1305824412 -7200 # Node ID 90160f32dbae6535e54e72375b004c0113ed1f62 # Parent c8f5b4743f9a91dc1e879d35f8f2d4b981f0963d gcc-4.6 compile fix: xen/arch/x86/acpi/cpu_idle.c cpu_idle.c: In function ''acpi_idle_do_entry'': cpu_idle.c:276:9: error: variable ''unused'' set but not used [-Werror=unused-but-set-variable] Signed-off-by: Olaf Hering <olaf@aepfle.de> diff -r c8f5b4743f9a -r 90160f32dbae xen/arch/x86/acpi/cpu_idle.c --- a/xen/arch/x86/acpi/cpu_idle.c Thu May 19 19:00:11 2011 +0200 +++ b/xen/arch/x86/acpi/cpu_idle.c Thu May 19 19:00:12 2011 +0200 @@ -273,7 +273,7 @@ static void acpi_processor_ffh_cstate_en static void acpi_idle_do_entry(struct acpi_processor_cx *cx) { - int unused; + int unused __attribute__((unused)); switch ( cx->entry_method ) { _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Olaf Hering
2011-May-19 19:05 UTC
[Xen-devel] [PATCH 28 of 45] gcc-4.6 compile fix: xen/arch/x86/cpu/amd.c
# HG changeset patch # User Olaf Hering <olaf@aepfle.de> # Date 1305824414 -7200 # Node ID c8e4a190705be60bae9cff30c90a8a4a307979ec # Parent 90160f32dbae6535e54e72375b004c0113ed1f62 gcc-4.6 compile fix: xen/arch/x86/cpu/amd.c amd.c: In function ''init_amd'': amd.c:332:6: error: variable ''r'' set but not used [-Werror=unused-but-set-variable] Signed-off-by: Olaf Hering <olaf@aepfle.de> diff -r 90160f32dbae -r c8e4a190705b xen/arch/x86/cpu/amd.c --- a/xen/arch/x86/cpu/amd.c Thu May 19 19:00:12 2011 +0200 +++ b/xen/arch/x86/cpu/amd.c Thu May 19 19:00:14 2011 +0200 @@ -329,7 +329,6 @@ static void check_syscfg_dram_mod_en(voi static void __devinit init_amd(struct cpuinfo_x86 *c) { u32 l, h; - int r; #ifdef CONFIG_SMP unsigned long long value; @@ -375,8 +374,6 @@ static void __devinit init_amd(struct cp } #endif - r = get_model_name(c); - switch(c->x86) { case 6: /* An Athlon/Duron */ _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Olaf Hering
2011-May-19 19:05 UTC
[Xen-devel] [PATCH 29 of 45] gcc-4.6 compile fix: xen/arch/x86/cpu/intel.c
# HG changeset patch # User Olaf Hering <olaf@aepfle.de> # Date 1305824415 -7200 # Node ID 30c6a8c61c90f896ba2ef9ee2f4f417cea7c1ffa # Parent c8e4a190705be60bae9cff30c90a8a4a307979ec gcc-4.6 compile fix: xen/arch/x86/cpu/intel.c intel.c: In function ''set_cpuidmask'': intel.c:36:14: error: variable ''extra'' set but not used [-Werror=unused-but-set-variable] Signed-off-by: Olaf Hering <olaf@aepfle.de> diff -r c8e4a190705b -r 30c6a8c61c90 xen/arch/x86/cpu/intel.c --- a/xen/arch/x86/cpu/intel.c Thu May 19 19:00:14 2011 +0200 +++ b/xen/arch/x86/cpu/intel.c Thu May 19 19:00:15 2011 +0200 @@ -33,8 +33,6 @@ struct movsl_mask movsl_mask __read_most */ static void __devinit set_cpuidmask(const struct cpuinfo_x86 *c) { - const char *extra = ""; - if (!~(opt_cpuid_mask_ecx & opt_cpuid_mask_edx & opt_cpuid_mask_ext_ecx & opt_cpuid_mask_ext_edx)) return; @@ -51,7 +49,6 @@ static void __devinit set_cpuidmask(cons opt_cpuid_mask_edx); if (!~(opt_cpuid_mask_ext_ecx & opt_cpuid_mask_ext_edx)) return; - extra = "extended "; break; /* * CPU supports this feature if the processor signature meets the following: _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Olaf Hering
2011-May-19 19:05 UTC
[Xen-devel] [PATCH 30 of 45] gcc-4.6 compile fix: xen/arch/x86/cpu/intel_cacheinfo.c
# HG changeset patch # User Olaf Hering <olaf@aepfle.de> # Date 1305824416 -7200 # Node ID 284f38a196bfdb82c9a2b8b7f0b748269ce95126 # Parent 30c6a8c61c90f896ba2ef9ee2f4f417cea7c1ffa gcc-4.6 compile fix: xen/arch/x86/cpu/intel_cacheinfo.c intel_cacheinfo.c: In function ''init_intel_cacheinfo'': intel_cacheinfo.c:173:26: error: variable ''l3_id'' set but not used [-Werror=unused-but-set-variable] intel_cacheinfo.c:173:15: error: variable ''l2_id'' set but not used [-Werror=unused-but-set-variable] Signed-off-by: Olaf Hering <olaf@aepfle.de> diff -r 30c6a8c61c90 -r 284f38a196bf xen/arch/x86/cpu/intel_cacheinfo.c --- a/xen/arch/x86/cpu/intel_cacheinfo.c Thu May 19 19:00:15 2011 +0200 +++ b/xen/arch/x86/cpu/intel_cacheinfo.c Thu May 19 19:00:16 2011 +0200 @@ -170,7 +170,6 @@ unsigned int __cpuinit init_intel_cachei unsigned int trace = 0, l1i = 0, l1d = 0, l2 = 0, l3 = 0; /* Cache sizes */ unsigned int new_l1d = 0, new_l1i = 0; /* Cache sizes from cpuid(4) */ unsigned int new_l2 = 0, new_l3 = 0, i; /* Cache sizes from cpuid(4) */ - unsigned int l2_id = 0, l3_id = 0, num_threads_sharing, index_msb; if (c->cpuid_level > 3) { static int is_initialized; @@ -203,15 +202,9 @@ unsigned int __cpuinit init_intel_cachei break; case 2: new_l2 = this_leaf.size/1024; - num_threads_sharing = 1 + this_leaf.eax.split.num_threads_sharing; - index_msb = get_count_order(num_threads_sharing); - l2_id = c->apicid >> index_msb; break; case 3: new_l3 = this_leaf.size/1024; - num_threads_sharing = 1 + this_leaf.eax.split.num_threads_sharing; - index_msb = get_count_order(num_threads_sharing); - l3_id = c->apicid >> index_msb; break; default: break; _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Olaf Hering
2011-May-19 19:05 UTC
[Xen-devel] [PATCH 31 of 45] gcc-4.6 compile fix: xen/arch/x86/cpu/mcheck/mce.c
# HG changeset patch # User Olaf Hering <olaf@aepfle.de> # Date 1305824417 -7200 # Node ID c3b532f1954b6c36e14f41481a2ba4fa5052f6ae # Parent 284f38a196bfdb82c9a2b8b7f0b748269ce95126 gcc-4.6 compile fix: xen/arch/x86/cpu/mcheck/mce.c mce.c: In function ''mcheck_mca_logout'': mce.c:300:29: error: variable ''mib'' set but not used [-Werror=unused-but-set-variable] mce.c: In function ''x86_mc_msrinject'': mce.c:1229:25: error: variable ''c'' set but not used [-Werror=unused-but-set-variable] Signed-off-by: Olaf Hering <olaf@aepfle.de> diff -r 284f38a196bf -r c3b532f1954b xen/arch/x86/cpu/mcheck/mce.c --- a/xen/arch/x86/cpu/mcheck/mce.c Thu May 19 19:00:16 2011 +0200 +++ b/xen/arch/x86/cpu/mcheck/mce.c Thu May 19 19:00:17 2011 +0200 @@ -162,19 +162,19 @@ void mce_need_clearbank_register(mce_nee mc_need_clearbank_scan = cbfunc; } -static struct mcinfo_bank *mca_init_bank(enum mca_source who, +static void mca_init_bank(enum mca_source who, struct mc_info *mi, int bank) { struct mcinfo_bank *mib; if (!mi) - return NULL; + return; mib = x86_mcinfo_reserve(mi, sizeof(struct mcinfo_bank)); if (!mib) { mi->flags |= MCINFO_FLAGS_UNCOMPLETE; - return NULL; + return; } memset(mib, 0, sizeof (struct mcinfo_bank)); @@ -207,8 +207,6 @@ static struct mcinfo_bank *mca_init_bank mib->mc_ctrl2 = mca_rdmsr(MSR_IA32_MC0_CTL2 + bank); rdtscll(mib->mc_tsc); } - - return mib; } static int mca_init_global(uint32_t flags, struct mcinfo_global *mig) @@ -297,8 +295,6 @@ mctelem_cookie_t mcheck_mca_logout(enum recover = (mc_recoverable_scan)? 1: 0; for (i = 0; i < nr_mce_banks; i++) { - struct mcinfo_bank *mib; /* on stack */ - /* Skip bank if corresponding bit in bankmask is clear */ if (!mcabanks_test(i, bankmask)) continue; @@ -353,7 +349,7 @@ mctelem_cookie_t mcheck_mca_logout(enum */ recover = mc_recoverable_scan(status); - mib = mca_init_bank(who, mci, i); + mca_init_bank(who, mci, i); if (mc_callback_bank_extended) mc_callback_bank_extended(mci, i, status); @@ -1226,13 +1222,10 @@ static void x86_mc_msrinject(void *data) { struct xen_mc_msrinject *mci = data; struct mcinfo_msr *msr; - struct cpuinfo_x86 *c; uint64_t hwcr = 0; int intpose; int i; - c = &cpu_data[smp_processor_id()]; - if (mci->mcinj_flags & _MC_MSRINJ_F_REQ_HWCR_WREN) hwcr = x86_mc_hwcr_wren(); _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Olaf Hering
2011-May-19 19:05 UTC
[Xen-devel] [PATCH 32 of 45] gcc-4.6 compile fix: xen/arch/x86/hvm/emulate.c
# HG changeset patch # User Olaf Hering <olaf@aepfle.de> # Date 1305824418 -7200 # Node ID afab96a155bcd7c2874f00c83c5987123b3ded4f # Parent c3b532f1954b6c36e14f41481a2ba4fa5052f6ae gcc-4.6 compile fix: xen/arch/x86/hvm/emulate.c emulate.c: In function ''hvmemul_do_io'': emulate.c:62:11: error: variable ''ram_mfn'' set but not used [-Werror=unused-but-set-variable] Signed-off-by: Olaf Hering <olaf@aepfle.de> diff -r c3b532f1954b -r afab96a155bc xen/arch/x86/hvm/emulate.c --- a/xen/arch/x86/hvm/emulate.c Thu May 19 19:00:17 2011 +0200 +++ b/xen/arch/x86/hvm/emulate.c Thu May 19 19:00:18 2011 +0200 @@ -59,11 +59,10 @@ static int hvmemul_do_io( ioreq_t *p = get_ioreq(curr); unsigned long ram_gfn = paddr_to_pfn(ram_gpa); p2m_type_t p2mt; - mfn_t ram_mfn; int rc; /* Check for paged out page */ - ram_mfn = gfn_to_mfn_unshare(p2m, ram_gfn, &p2mt, 0); + gfn_to_mfn_unshare(p2m, ram_gfn, &p2mt, 0); if ( p2m_is_paging(p2mt) ) { p2m_mem_paging_populate(p2m, ram_gfn); _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Olaf Hering
2011-May-19 19:05 UTC
[Xen-devel] [PATCH 33 of 45] gcc-4.6 compile fix: xen/arch/x86/hvm/hvm.c
# HG changeset patch # User Olaf Hering <olaf@aepfle.de> # Date 1305824420 -7200 # Node ID 15f2822f4efd2c432ad9fdbcf39c84b3d91379ae # Parent afab96a155bcd7c2874f00c83c5987123b3ded4f gcc-4.6 compile fix: xen/arch/x86/hvm/hvm.c hvm.c: In function ''hvm_migrate_pirqs'': hvm.c:258:15: error: variable ''irq'' set but not used [-Werror=unused-but-set-variable] hvm.c: In function ''do_hvm_op'': hvm.c:3757:19: error: variable ''mfn'' set but not used [-Werror=unused-but-set-variable] Signed-off-by: Olaf Hering <olaf@aepfle.de> diff -r afab96a155bc -r 15f2822f4efd xen/arch/x86/hvm/hvm.c --- a/xen/arch/x86/hvm/hvm.c Thu May 19 19:00:18 2011 +0200 +++ b/xen/arch/x86/hvm/hvm.c Thu May 19 19:00:20 2011 +0200 @@ -255,7 +255,7 @@ void hvm_migrate_timers(struct vcpu *v) void hvm_migrate_pirqs(struct vcpu *v) { - int pirq, irq; + int pirq, irq __attribute__ ((unused)); struct irq_desc *desc; struct domain *d = v->domain; struct hvm_irq_dpci *hvm_irq_dpci = d->arch.hvm_domain.irq.dpci; @@ -3750,8 +3750,7 @@ long do_hvm_op(unsigned long op, XEN_GUE { p2m_type_t t; p2m_type_t nt; - mfn_t mfn; - mfn = gfn_to_mfn_unshare(p2m, pfn, &t, 0); + gfn_to_mfn_unshare(p2m, pfn, &t, 0); if ( p2m_is_paging(t) ) { p2m_mem_paging_populate(p2m, pfn); _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Olaf Hering
2011-May-19 19:05 UTC
[Xen-devel] [PATCH 34 of 45] gcc-4.6 compile fix: xen/arch/x86/hvm/viridian.c
# HG changeset patch # User Olaf Hering <olaf@aepfle.de> # Date 1305824421 -7200 # Node ID 2aa144e0963abf2cb568e7b82204a371147a4c47 # Parent 15f2822f4efd2c432ad9fdbcf39c84b3d91379ae gcc-4.6 compile fix: xen/arch/x86/hvm/viridian.c viridian.c: In function ''viridian_hypercall'': viridian.c:273:37: error: variable ''output_params_gpa'' set but not used [-Werror=unused-but-set-variable] viridian.c:273:19: error: variable ''input_params_gpa'' set but not used [-Werror=unused-but-set-variable] Signed-off-by: Olaf Hering <olaf@aepfle.de> diff -r 15f2822f4efd -r 2aa144e0963a xen/arch/x86/hvm/viridian.c --- a/xen/arch/x86/hvm/viridian.c Thu May 19 19:00:20 2011 +0200 +++ b/xen/arch/x86/hvm/viridian.c Thu May 19 19:00:21 2011 +0200 @@ -270,7 +270,6 @@ int rdmsr_viridian_regs(uint32_t idx, ui int viridian_hypercall(struct cpu_user_regs *regs) { int mode = hvm_guest_x86_mode(current); - unsigned long input_params_gpa, output_params_gpa; uint16_t status = HV_STATUS_SUCCESS; union hypercall_input { @@ -302,14 +301,10 @@ int viridian_hypercall(struct cpu_user_r #ifdef __x86_64__ case 8: input.raw = regs->rcx; - input_params_gpa = regs->rdx; - output_params_gpa = regs->r8; break; #endif case 4: input.raw = ((uint64_t)regs->edx << 32) | regs->eax; - input_params_gpa = ((uint64_t)regs->ebx << 32) | regs->ecx; - output_params_gpa = ((uint64_t)regs->edi << 32) | regs->esi; break; default: goto out; _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Olaf Hering
2011-May-19 19:05 UTC
[Xen-devel] [PATCH 35 of 45] gcc-4.6 compile fix: xen/arch/x86/mm/p2m-pod.c
# HG changeset patch # User Olaf Hering <olaf@aepfle.de> # Date 1305824422 -7200 # Node ID ac80525a292af94a2294dad07d5927167a49f44e # Parent 2aa144e0963abf2cb568e7b82204a371147a4c47 gcc-4.6 compile fix: xen/arch/x86/mm/p2m-pod.c p2m-pod.c: In function ''guest_physmap_mark_populate_on_demand'': p2m-pod.c:1101:11: error: variable ''omfn'' set but not used [-Werror=unused-but-set-variable] Signed-off-by: Olaf Hering <olaf@aepfle.de> diff -r 2aa144e0963a -r ac80525a292a xen/arch/x86/mm/p2m-pod.c --- a/xen/arch/x86/mm/p2m-pod.c Thu May 19 19:00:21 2011 +0200 +++ b/xen/arch/x86/mm/p2m-pod.c Thu May 19 19:00:22 2011 +0200 @@ -1098,7 +1098,6 @@ guest_physmap_mark_populate_on_demand(st struct p2m_domain *p2m = p2m_get_hostp2m(d); unsigned long i; p2m_type_t ot; - mfn_t omfn; int pod_count = 0; int rc = 0; @@ -1116,7 +1115,7 @@ guest_physmap_mark_populate_on_demand(st /* Make sure all gpfns are unused */ for ( i = 0; i < (1UL << order); i++ ) { - omfn = gfn_to_mfn_query(p2m, gfn + i, &ot); + gfn_to_mfn_query(p2m, gfn + i, &ot); if ( p2m_is_ram(ot) ) { printk("%s: gfn_to_mfn returned type %d!\n", _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Olaf Hering
2011-May-19 19:05 UTC
[Xen-devel] [PATCH 36 of 45] gcc-4.6 compile fix: xen/arch/x86/mm/mem_sharing.c
# HG changeset patch # User Olaf Hering <olaf@aepfle.de> # Date 1305824424 -7200 # Node ID 535fce9f4de3e0ecf630b2707d28c8c8bfbc0b67 # Parent ac80525a292af94a2294dad07d5927167a49f44e gcc-4.6 compile fix: xen/arch/x86/mm/mem_sharing.c mem_sharing.c: In function ''mem_sharing_debug_gfn'': mem_sharing.c:379:23: error: variable ''page'' set but not used [-Werror=unused-but-set-variable] Signed-off-by: Olaf Hering <olaf@aepfle.de> diff -r ac80525a292a -r 535fce9f4de3 xen/arch/x86/mm/mem_sharing.c --- a/xen/arch/x86/mm/mem_sharing.c Thu May 19 19:00:22 2011 +0200 +++ b/xen/arch/x86/mm/mem_sharing.c Thu May 19 19:00:24 2011 +0200 @@ -376,10 +376,8 @@ int mem_sharing_debug_gfn(struct domain { p2m_type_t p2mt; mfn_t mfn; - struct page_info *page; mfn = gfn_to_mfn(p2m_get_hostp2m(d), gfn, &p2mt); - page = mfn_to_page(mfn); printk("Debug for domain=%d, gfn=%lx, ", d->domain_id, _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Olaf Hering
2011-May-19 19:05 UTC
[Xen-devel] [PATCH 37 of 45] gcc-4.6 compile fix: xen/arch/x86/x86_64/mm.c
# HG changeset patch # User Olaf Hering <olaf@aepfle.de> # Date 1305824425 -7200 # Node ID 305d1c98f6f82bfec8efb7798520ff39371c1cdf # Parent 535fce9f4de3e0ecf630b2707d28c8c8bfbc0b67 gcc-4.6 compile fix: xen/arch/x86/x86_64/mm.c mm.c: In function ''setup_compat_m2p_table'': mm.c:440:21: error: variable ''memflags'' set but not used [-Werror=unused-but-set-variable] Signed-off-by: Olaf Hering <olaf@aepfle.de> diff -r 535fce9f4de3 -r 305d1c98f6f8 xen/arch/x86/x86_64/mm.c --- a/xen/arch/x86/x86_64/mm.c Thu May 19 19:00:24 2011 +0200 +++ b/xen/arch/x86/x86_64/mm.c Thu May 19 19:00:25 2011 +0200 @@ -437,7 +437,7 @@ void destroy_m2p_mapping(struct mem_hota static int setup_compat_m2p_table(struct mem_hotadd_info *info) { unsigned long i, va, smap, emap, rwva, epfn = info->epfn; - unsigned int n, memflags; + unsigned int n; l3_pgentry_t *l3_ro_mpt = NULL; l2_pgentry_t *l2_ro_mpt = NULL; struct page_info *l1_pg; @@ -489,8 +489,6 @@ static int setup_compat_m2p_table(struct if ( n == CNT ) continue; - memflags = MEMF_node(phys_to_nid(i << PAGE_SHIFT)); - l1_pg = mfn_to_page(alloc_hotadd_mfn(info)); err = map_pages_to_xen(rwva, page_to_mfn(l1_pg), 1UL << PAGETABLE_ORDER, _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Olaf Hering
2011-May-19 19:05 UTC
[Xen-devel] [PATCH 38 of 45] gcc-4.6 compile fix: xen/arch/x86/mm.c
# HG changeset patch # User Olaf Hering <olaf@aepfle.de> # Date 1305824426 -7200 # Node ID ce00a34fc0a36f9c0d85e2ada2f458a6fc107641 # Parent 305d1c98f6f82bfec8efb7798520ff39371c1cdf gcc-4.6 compile fix: xen/arch/x86/mm.c mm.c: In function ''ptwr_emulated_update'': mm.c:4979:23: error: variable ''page'' set but not used [-Werror=unused-but-set-variable] Signed-off-by: Olaf Hering <olaf@aepfle.de> diff -r 305d1c98f6f8 -r ce00a34fc0a3 xen/arch/x86/mm.c --- a/xen/arch/x86/mm.c Thu May 19 19:00:25 2011 +0200 +++ b/xen/arch/x86/mm.c Thu May 19 19:00:26 2011 +0200 @@ -4976,7 +4976,7 @@ static int ptwr_emulated_update( { unsigned long mfn; unsigned long unaligned_addr = addr; - struct page_info *page; + struct page_info *page __attribute__((unused)); l1_pgentry_t pte, ol1e, nl1e, *pl1e; struct vcpu *v = current; struct domain *d = v->domain; _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Olaf Hering
2011-May-19 19:05 UTC
[Xen-devel] [PATCH 39 of 45] gcc-4.6 compile fix: xen/arch/x86/cpu/mcheck/vmce.c
# HG changeset patch # User Olaf Hering <olaf@aepfle.de> # Date 1305824427 -7200 # Node ID a00c741e827f594ebd690a7e3d15d00a03e7bbef # Parent ce00a34fc0a36f9c0d85e2ada2f458a6fc107641 gcc-4.6 compile fix: xen/arch/x86/cpu/mcheck/vmce.c vmce.c: In function ''unmmap_broken_page'': vmce.c:579:11: error: variable ''r_mfn'' set but not used [-Werror=unused-but-set-variable] Signed-off-by: Olaf Hering <olaf@aepfle.de> diff -r ce00a34fc0a3 -r a00c741e827f xen/arch/x86/cpu/mcheck/vmce.c --- a/xen/arch/x86/cpu/mcheck/vmce.c Thu May 19 19:00:26 2011 +0200 +++ b/xen/arch/x86/cpu/mcheck/vmce.c Thu May 19 19:00:27 2011 +0200 @@ -576,7 +576,7 @@ int is_vmce_ready(struct mcinfo_bank *ba */ int unmmap_broken_page(struct domain *d, mfn_t mfn, unsigned long gfn) { - mfn_t r_mfn; + mfn_t r_mfn __attribute__ ((unused)); struct p2m_domain *p2m; p2m_type_t pt; _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Olaf Hering
2011-May-19 19:05 UTC
[Xen-devel] [PATCH 40 of 45] gcc-4.6 compile fix: xen/common/tmem.c
# HG changeset patch # User Olaf Hering <olaf@aepfle.de> # Date 1305824429 -7200 # Node ID fcc266b4dcc586b1900bcfeb522cf82df7215cf9 # Parent a00c741e827f594ebd690a7e3d15d00a03e7bbef gcc-4.6 compile fix: xen/common/tmem.c tmem.c: In function ''tmem_evict'': tmem.c:1349:32: error: variable ''pgp_del'' set but not used [-Werror=unused-but-set-variable] tmem.c: In function ''do_tmem_put'': tmem.c:1586:25: error: variable ''pgpdel'' set but not used [-Werror=unused-but-set-variable] Signed-off-by: Olaf Hering <olaf@aepfle.de> diff -r a00c741e827f -r fcc266b4dcc5 xen/common/tmem.c --- a/xen/common/tmem.c Thu May 19 19:00:27 2011 +0200 +++ b/xen/common/tmem.c Thu May 19 19:00:29 2011 +0200 @@ -1346,7 +1346,7 @@ obj_unlock: static int tmem_evict(void) { client_t *client = tmh_client_from_current(); - pgp_t *pgp = NULL, *pgp2, *pgp_del; + pgp_t *pgp = NULL, *pgp2, *pgp_del __attribute__((unused)); obj_t *obj; pool_t *pool; int ret = 0; @@ -1583,7 +1583,7 @@ static NOINLINE int do_tmem_put(pool_t * pagesize_t pfn_offset, pagesize_t len, void *cva) { obj_t *obj = NULL, *objfound = NULL, *objnew = NULL; - pgp_t *pgp = NULL, *pgpdel = NULL; + pgp_t *pgp = NULL, *pgpdel __attribute__((unused)); client_t *client = pool->client; int ret = client->frozen ? -EFROZEN : -ENOMEM; _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Olaf Hering
2011-May-19 19:06 UTC
[Xen-devel] [PATCH 41 of 45] gcc-4.6 compile fix: xen/common/tmem_xen.c
# HG changeset patch # User Olaf Hering <olaf@aepfle.de> # Date 1305824430 -7200 # Node ID 881c89e72ed5955fee3bd90bd200e78a41f124db # Parent fcc266b4dcc586b1900bcfeb522cf82df7215cf9 gcc-4.6 compile fix: xen/common/tmem_xen.c tmem_xen.c: In function ''tmh_compress_from_client'': tmem_xen.c:180:9: error: variable ''ret'' set but not used [-Werror=unused-but-set-variable] tmem_xen.c: In function ''tmh_decompress_to_client'': tmem_xen.c:240:9: error: variable ''ret'' set but not used [-Werror=unused-but-set-variable] tmem_xen.c: In function ''tmh_client_init'': tmem_xen.c:369:10: error: variable ''name'' set but not used [-Werror=unused-but-set-variable] Signed-off-by: Olaf Hering <olaf@aepfle.de> diff -r fcc266b4dcc5 -r 881c89e72ed5 xen/common/tmem_xen.c --- a/xen/common/tmem_xen.c Thu May 19 19:00:29 2011 +0200 +++ b/xen/common/tmem_xen.c Thu May 19 19:00:30 2011 +0200 @@ -177,7 +177,7 @@ EXPORT int tmh_copy_from_client(pfp_t *p EXPORT int tmh_compress_from_client(tmem_cli_mfn_t cmfn, void **out_va, size_t *out_len, void *cli_va) { - int ret = 0; + int ret __attribute__ ((unused)); unsigned char *dmem = this_cpu(dstmem); unsigned char *wmem = this_cpu(workmem); pfp_t *cli_pfp = NULL; @@ -237,7 +237,7 @@ EXPORT int tmh_decompress_to_client(tmem pfp_t *cli_pfp = NULL; size_t out_len = PAGE_SIZE; bool_t tmemc = cli_va != NULL; /* if true, cli_va is control-op buffer */ - int ret; + int ret __attribute__ ((unused)); if ( !tmemc ) { @@ -366,15 +366,17 @@ static void tmh_persistent_pool_page_put EXPORT tmh_client_t *tmh_client_init(cli_id_t cli_id) { tmh_client_t *tmh; +#ifndef __i386__ char name[5]; int i, shift; +#endif if ( (tmh = xmalloc(tmh_client_t)) == NULL ) return NULL; +#ifndef __i386__ for (i = 0, shift = 12; i < 4; shift -=4, i++) name[i] = (((unsigned short)cli_id >> shift) & 0xf) + ''0''; name[4] = ''\0''; -#ifndef __i386__ tmh->persistent_pool = xmem_pool_create(name, tmh_persistent_pool_page_get, tmh_persistent_pool_page_put, PAGE_SIZE, 0, PAGE_SIZE); if ( tmh->persistent_pool == NULL ) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Olaf Hering
2011-May-19 19:06 UTC
[Xen-devel] [PATCH 42 of 45] gcc-4.6 compile fix: xen/arch/x86/mm/p2m.c
# HG changeset patch # User Olaf Hering <olaf@aepfle.de> # Date 1305824431 -7200 # Node ID 2e6175d0996618f80fd26106257d6cb8b61b046d # Parent 881c89e72ed5955fee3bd90bd200e78a41f124db gcc-4.6 compile fix: xen/arch/x86/mm/p2m.c p2m.c: In function ''p2m_remove_page'': p2m.c:324:11: error: variable ''mfn_return'' set but not used [-Werror=unused-but-set-variable] Signed-off-by: Olaf Hering <olaf@aepfle.de> diff -r 881c89e72ed5 -r 2e6175d09966 xen/arch/x86/mm/p2m.c --- a/xen/arch/x86/mm/p2m.c Thu May 19 19:00:30 2011 +0200 +++ b/xen/arch/x86/mm/p2m.c Thu May 19 19:00:31 2011 +0200 @@ -321,7 +321,7 @@ p2m_remove_page(struct p2m_domain *p2m, unsigned int page_order) { unsigned long i; - mfn_t mfn_return; + mfn_t mfn_return __attribute__ ((unused)); p2m_type_t t; p2m_access_t a; _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Olaf Hering
2011-May-19 19:06 UTC
[Xen-devel] [PATCH 43 of 45] gcc-4.6 compile fix: xen/arch/x86/mm/shadow/multi.c
# HG changeset patch # User Olaf Hering <olaf@aepfle.de> # Date 1305824432 -7200 # Node ID f64bb486b83ccefb1e1352db56f898b8272ad56d # Parent 2e6175d0996618f80fd26106257d6cb8b61b046d gcc-4.6 compile fix: xen/arch/x86/mm/shadow/multi.c multi.c: In function ''set_shadow_status'': multi.c:127:9: error: variable ''res'' set but not used [-Werror=unused-but-set-variable] multi.c: In function ''sh_rm_write_access_from_sl1p__guest_2'': multi.c:4434:9: error: variable ''r'' set but not used [-Werror=unused-but-set-variable] Signed-off-by: Olaf Hering <olaf@aepfle.de> diff -r 2e6175d09966 -r f64bb486b83c xen/arch/x86/mm/shadow/multi.c --- a/xen/arch/x86/mm/shadow/multi.c Thu May 19 19:00:31 2011 +0200 +++ b/xen/arch/x86/mm/shadow/multi.c Thu May 19 19:00:32 2011 +0200 @@ -124,7 +124,7 @@ set_shadow_status(struct vcpu *v, mfn_t /* Put a shadow into the hash table */ { struct domain *d = v->domain; - int res; + int res __attribute__((unused)); SHADOW_PRINTK("d=%d, v=%d, gmfn=%05lx, type=%08x, smfn=%05lx\n", d->domain_id, v->vcpu_id, mfn_x(gmfn), @@ -4431,7 +4431,7 @@ sh_update_cr3(struct vcpu *v, int do_loc int sh_rm_write_access_from_sl1p(struct vcpu *v, mfn_t gmfn, mfn_t smfn, unsigned long off) { - int r; + int r __attribute__((unused)); shadow_l1e_t *sl1p, sl1e; struct page_info *sp; _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Olaf Hering
2011-May-19 19:06 UTC
[Xen-devel] [PATCH 44 of 45] gcc-4.6 compile fix: xen/arch/x86/traps.c
# HG changeset patch # User Olaf Hering <olaf@aepfle.de> # Date 1305824433 -7200 # Node ID 9c4ff80169706c948442799f82c15cc65ad403c8 # Parent f64bb486b83ccefb1e1352db56f898b8272ad56d gcc-4.6 compile fix: xen/arch/x86/traps.c traps.c: In function ''emulate_privileged_op'': traps.c:1742:48: error: variable ''lm_ovr'' set but not used [-Werror=unused-but-set-variable] Signed-off-by: Olaf Hering <olaf@aepfle.de> diff -r f64bb486b83c -r 9c4ff8016970 xen/arch/x86/traps.c --- a/xen/arch/x86/traps.c Thu May 19 19:00:32 2011 +0200 +++ b/xen/arch/x86/traps.c Thu May 19 19:00:33 2011 +0200 @@ -1739,7 +1739,9 @@ static int emulate_privileged_op(struct struct vcpu *v = current; unsigned long *reg, eip = regs->eip; u8 opcode, modrm_reg = 0, modrm_rm = 0, rep_prefix = 0, lock = 0, rex = 0; +#ifdef CONFIG_X86_64 enum { lm_seg_none, lm_seg_fs, lm_seg_gs } lm_ovr = lm_seg_none; +#endif int rc; unsigned int port, i, data_sel, ar, data, bpmatch = 0; unsigned int op_bytes, op_default, ad_bytes, ad_default, opsize_prefix= 0; @@ -1795,11 +1797,15 @@ static int emulate_privileged_op(struct continue; case 0x64: /* FS override */ data_sel = read_sreg(regs, fs); +#ifdef CONFIG_X86_64 lm_ovr = lm_seg_fs; +#endif continue; case 0x65: /* GS override */ data_sel = read_sreg(regs, gs); +#ifdef CONFIG_X86_64 lm_ovr = lm_seg_gs; +#endif continue; case 0x36: /* SS override */ data_sel = regs->ss; @@ -1846,7 +1852,9 @@ static int emulate_privileged_op(struct if ( !(opcode & 2) ) { data_sel = read_sreg(regs, es); +#ifdef CONFIG_X86_64 lm_ovr = lm_seg_none; +#endif } if ( !(ar & _SEGMENT_L) ) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Olaf Hering
2011-May-19 19:06 UTC
[Xen-devel] [PATCH 45 of 45] gcc-4.6 compile fix: xen/arch/x86/domain_build.c
# HG changeset patch # User Olaf Hering <olaf@aepfle.de> # Date 1305824435 -7200 # Node ID aa545d1b4f1c4b664d6ac49dd158acc68d9588ab # Parent 9c4ff80169706c948442799f82c15cc65ad403c8 gcc-4.6 compile fix: xen/arch/x86/domain_build.c domain_build.c: In function ''construct_dom0'': domain_build.c:305:33: error: variable ''compat32'' set but not used [-Werror=unused-but-set-variable] Signed-off-by: Olaf Hering <olaf@aepfle.de> diff -r 9c4ff8016970 -r aa545d1b4f1c xen/arch/x86/domain_build.c --- a/xen/arch/x86/domain_build.c Thu May 19 19:00:33 2011 +0200 +++ b/xen/arch/x86/domain_build.c Thu May 19 19:00:35 2011 +0200 @@ -302,7 +302,10 @@ int __init construct_dom0( void *(*bootstrap_map)(const module_t *), char *cmdline) { - int i, cpu, rc, compatible, compat32, order, machine; + int i, cpu, rc, compatible, order, machine; +#if defined(__x86_64__) + int compat32 = 0; +#endif struct cpu_user_regs *regs; unsigned long pfn, mfn; unsigned long nr_pages; @@ -377,7 +380,6 @@ int __init construct_dom0( /* compatibility check */ compatible = 0; - compat32 = 0; machine = elf_uval(&elf, elf.ehdr, e_machine); switch (CONFIG_PAGING_LEVELS) { case 3: /* x86_32p */ @@ -393,7 +395,9 @@ int __init construct_dom0( parms.pae = PAEKERN_extended_cr3; if (elf_32bit(&elf) && parms.pae && machine == EM_386) { +#if defined(__x86_64__) compat32 = 1; +#endif compatible = 1; } if (elf_64bit(&elf) && machine == EM_X86_64) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jan Beulich
2011-May-20 07:38 UTC
Re: [Xen-devel] [PATCH 00 of 45] gcc 4.6 compile fixes for xen-unstable
>>> On 19.05.11 at 21:05, Olaf Hering <olaf@aepfle.de> wrote: > The following series fix compile errors with gcc 4.6. > Please review if each change is correct.Hmm, this large amount of changes makes we wonder whether we shouldn''t simply turn of the unused-but-set-variable warning altogether, or at least not have it be an error. Not the least because I''m not sure it''d be nice to backport all of these changes into older trees (which obviously would suffer mostly the same problems when built with 4.6 or newer). Jan> Thanks, > > Olaf > > tools/console/client/main.c | 3 -- > tools/debugger/gdbsx/gx/gx_comm.c | 2 - > tools/firmware/rombios/32bit/tcgbios/tcgbios.c | 2 - > tools/libxc/xc_domain_restore.c | 2 - > tools/libxc/xc_tmem.c | 3 -- > tools/libxl/libxl.c | 6 ++--- > tools/libxl/libxl_dom.c | 4 +-- > tools/libxl/libxl_pci.c | 2 - > tools/libxl/libxl_utils.c | 2 - > tools/libxl/libxlu_cfg.c | 2 - > tools/libxl/xl_cmdimpl.c | 5 ---- > tools/misc/gtraceview.c | 3 -- > tools/python/xen/lowlevel/checkpoint/libcheckpoint.c | 6 +---- > tools/python/xen/lowlevel/netlink/libnetlink.c | 3 -- > tools/xcutils/xc_restore.c | 3 -- > tools/xenstat/xentop/xentop.c | 8 +------ > tools/xenstore/xenstored_core.c | 20 ++++++++++++++----- > xen/arch/x86/acpi/cpu_idle.c | 2 - > xen/arch/x86/cpu/amd.c | 3 -- > xen/arch/x86/cpu/intel.c | 3 -- > xen/arch/x86/cpu/intel_cacheinfo.c | 7 ------ > xen/arch/x86/cpu/mcheck/mce.c | 15 +++----------- > xen/arch/x86/cpu/mcheck/vmce.c | 2 - > xen/arch/x86/hvm/emulate.c | 3 -- > xen/arch/x86/hvm/hvm.c | 5 +--- > xen/arch/x86/hvm/viridian.c | 5 ---- > xen/arch/x86/microcode_amd.c | 3 -- > xen/arch/x86/mm.c | 2 - > xen/arch/x86/mm/mem_sharing.c | 2 - > xen/arch/x86/mm/p2m-pod.c | 3 -- > xen/arch/x86/mm/p2m.c | 2 - > xen/arch/x86/mm/shadow/multi.c | 4 +-- > xen/arch/x86/msi.c | 9 -------- > xen/arch/x86/time.c | 5 ++-- > xen/arch/x86/x86_64/mm.c | 4 --- > xen/common/cpupool.c | 2 - > xen/common/grant_table.c | 2 - > xen/common/kexec.c | 2 - > xen/common/sched_credit2.c | 4 --- > xen/common/tmem.c | 4 +-- > xen/common/tmem_xen.c | 4 +-- > xen/common/unlzo.c | 3 -- > xen/drivers/passthrough/vtd/intremap.c | 6 ----- > 43 files changed, 59 insertions(+), 123 deletions(-) > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jan Beulich
2011-May-20 07:43 UTC
Re: [Xen-devel] [PATCH 18 of 45] gcc-4.6 compile fix: xen/common/cpupool.c
>>> On 19.05.11 at 21:05, Olaf Hering <olaf@aepfle.de> wrote: > # HG changeset patch > # User Olaf Hering <olaf@aepfle.de> > # Date 1305824402 -7200 > # Node ID 982cc1330a16cc27e3c1f16b4ee9874340ec01ed > # Parent 0ef116beb380f5a8f2bef7825c0f5f450520e923 > gcc-4.6 compile fix: xen/common/cpupool.c > > cpupool.c: In function ''cpupool_add_domain'': > cpupool.c:359:9: error: variable ''n_dom'' set but not used > [-Werror=unused-but-set-variable] > cpupool.c: In function ''cpupool_rm_domain'': > cpupool.c:384:9: error: variable ''n_dom'' set but not used > [-Werror=unused-but-set-variable] > cpupool.c:383:9: error: variable ''cpupool_id'' set but not used > [-Werror=unused-but-set-variable] > > Signed-off-by: Olaf Hering <olaf@aepfle.de> > > diff -r 0ef116beb380 -r 982cc1330a16 xen/common/cpupool.c > --- a/xen/common/cpupool.c Thu May 19 19:00:00 2011 +0200 > +++ b/xen/common/cpupool.c Thu May 19 19:00:02 2011 +0200 > @@ -35,7 +35,7 @@ static DEFINE_SPINLOCK(cpupool_lock); > > DEFINE_PER_CPU(struct cpupool *, cpupool); > > -#define cpupool_dprintk(x...) ((void)0) > +#define cpupool_dprintk(fmt, args...) { if (0) printk(fmt, ##args); }#define cpupool_dprintk(fmt, args...) ({ if (0) printk(fmt, ##args); })> > static struct cpupool *alloc_cpupool_struct(void) > { > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Olaf Hering
2011-May-20 07:44 UTC
Re: [Xen-devel] [PATCH 00 of 45] gcc 4.6 compile fixes for xen-unstable
On Fri, May 20, Jan Beulich wrote:> >>> On 19.05.11 at 21:05, Olaf Hering <olaf@aepfle.de> wrote: > > The following series fix compile errors with gcc 4.6. > > Please review if each change is correct. > > Hmm, this large amount of changes makes we wonder whether we > shouldn''t simply turn of the unused-but-set-variable warning > altogether, or at least not have it be an error. Not the least > because I''m not sure it''d be nice to backport all of these changes > into older trees (which obviously would suffer mostly the same > problems when built with 4.6 or newer).At least the 4.1 branch should receive the relevant changes for gcc 4.6. I can send a similar series for that branch. Olaf _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jan Beulich
2011-May-20 07:52 UTC
Re: [Xen-devel] [PATCH 27 of 45] gcc-4.6 compile fix: xen/arch/x86/acpi/cpu_idle.c
>>> On 19.05.11 at 21:05, Olaf Hering <olaf@aepfle.de> wrote: > # HG changeset patch > # User Olaf Hering <olaf@aepfle.de> > # Date 1305824412 -7200 > # Node ID 90160f32dbae6535e54e72375b004c0113ed1f62 > # Parent c8f5b4743f9a91dc1e879d35f8f2d4b981f0963d > gcc-4.6 compile fix: xen/arch/x86/acpi/cpu_idle.c > > cpu_idle.c: In function ''acpi_idle_do_entry'': > cpu_idle.c:276:9: error: variable ''unused'' set but not used > [-Werror=unused-but-set-variable] > > Signed-off-by: Olaf Hering <olaf@aepfle.de> > > diff -r c8f5b4743f9a -r 90160f32dbae xen/arch/x86/acpi/cpu_idle.c > --- a/xen/arch/x86/acpi/cpu_idle.c Thu May 19 19:00:11 2011 +0200 > +++ b/xen/arch/x86/acpi/cpu_idle.c Thu May 19 19:00:12 2011 +0200 > @@ -273,7 +273,7 @@ static void acpi_processor_ffh_cstate_en > > static void acpi_idle_do_entry(struct acpi_processor_cx *cx) > { > - int unused; > + int unused __attribute__((unused));Better remove the variable and its assignment - inl(), just as the inb() immediately before, can''t be removed by the compiler even if its result is unused (they''re volatile asm()-s). Jan> > switch ( cx->entry_method ) > { > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jan Beulich
2011-May-20 07:55 UTC
Re: [Xen-devel] [PATCH 29 of 45] gcc-4.6 compile fix: xen/arch/x86/cpu/intel.c
>>> On 19.05.11 at 21:05, Olaf Hering <olaf@aepfle.de> wrote: > # HG changeset patch > # User Olaf Hering <olaf@aepfle.de> > # Date 1305824415 -7200 > # Node ID 30c6a8c61c90f896ba2ef9ee2f4f417cea7c1ffa > # Parent c8e4a190705be60bae9cff30c90a8a4a307979ec > gcc-4.6 compile fix: xen/arch/x86/cpu/intel.c > > intel.c: In function ''set_cpuidmask'': > intel.c:36:14: error: variable ''extra'' set but not used > [-Werror=unused-but-set-variable]No, please don''t push this - it was a mistake that "extra" wasn''t used, and http://lists.xensource.com/archives/html/xen-devel/2011-05/msg00753.html corrects this. Jan> Signed-off-by: Olaf Hering <olaf@aepfle.de> > > diff -r c8e4a190705b -r 30c6a8c61c90 xen/arch/x86/cpu/intel.c > --- a/xen/arch/x86/cpu/intel.c Thu May 19 19:00:14 2011 +0200 > +++ b/xen/arch/x86/cpu/intel.c Thu May 19 19:00:15 2011 +0200 > @@ -33,8 +33,6 @@ struct movsl_mask movsl_mask __read_most > */ > static void __devinit set_cpuidmask(const struct cpuinfo_x86 *c) > { > - const char *extra = ""; > - > if (!~(opt_cpuid_mask_ecx & opt_cpuid_mask_edx & > opt_cpuid_mask_ext_ecx & opt_cpuid_mask_ext_edx)) > return; > @@ -51,7 +49,6 @@ static void __devinit set_cpuidmask(cons > opt_cpuid_mask_edx); > if (!~(opt_cpuid_mask_ext_ecx & opt_cpuid_mask_ext_edx)) > return; > - extra = "extended "; > break; > /* > * CPU supports this feature if the processor signature meets the > following: > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jan Beulich
2011-May-20 08:12 UTC
Re: [Xen-devel] [PATCH 44 of 45] gcc-4.6 compile fix: xen/arch/x86/traps.c
>>> On 19.05.11 at 21:06, Olaf Hering <olaf@aepfle.de> wrote: > # HG changeset patch > # User Olaf Hering <olaf@aepfle.de> > # Date 1305824433 -7200 > # Node ID 9c4ff80169706c948442799f82c15cc65ad403c8 > # Parent f64bb486b83ccefb1e1352db56f898b8272ad56d > gcc-4.6 compile fix: xen/arch/x86/traps.c > > traps.c: In function ''emulate_privileged_op'': > traps.c:1742:48: error: variable ''lm_ovr'' set but not used > [-Werror=unused-but-set-variable]Instead of these many #ifdef-s, wouldn''t just adding (void)lm_ovr somewhere work too? Jan> Signed-off-by: Olaf Hering <olaf@aepfle.de> > > diff -r f64bb486b83c -r 9c4ff8016970 xen/arch/x86/traps.c > --- a/xen/arch/x86/traps.c Thu May 19 19:00:32 2011 +0200 > +++ b/xen/arch/x86/traps.c Thu May 19 19:00:33 2011 +0200 > @@ -1739,7 +1739,9 @@ static int emulate_privileged_op(struct > struct vcpu *v = current; > unsigned long *reg, eip = regs->eip; > u8 opcode, modrm_reg = 0, modrm_rm = 0, rep_prefix = 0, lock = 0, rex = 0; > +#ifdef CONFIG_X86_64 > enum { lm_seg_none, lm_seg_fs, lm_seg_gs } lm_ovr = lm_seg_none; > +#endif > int rc; > unsigned int port, i, data_sel, ar, data, bpmatch = 0; > unsigned int op_bytes, op_default, ad_bytes, ad_default, opsize_prefix= 0; > @@ -1795,11 +1797,15 @@ static int emulate_privileged_op(struct > continue; > case 0x64: /* FS override */ > data_sel = read_sreg(regs, fs); > +#ifdef CONFIG_X86_64 > lm_ovr = lm_seg_fs; > +#endif > continue; > case 0x65: /* GS override */ > data_sel = read_sreg(regs, gs); > +#ifdef CONFIG_X86_64 > lm_ovr = lm_seg_gs; > +#endif > continue; > case 0x36: /* SS override */ > data_sel = regs->ss; > @@ -1846,7 +1852,9 @@ static int emulate_privileged_op(struct > if ( !(opcode & 2) ) > { > data_sel = read_sreg(regs, es); > +#ifdef CONFIG_X86_64 > lm_ovr = lm_seg_none; > +#endif > } > > if ( !(ar & _SEGMENT_L) ) > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2011-May-20 08:21 UTC
Re: [Xen-devel] [PATCH 03 of 45] gcc-4.6 compile fix: tools/xenstore/xenstored_core.c
On 19/05/2011 20:05, "Olaf Hering" <olaf@aepfle.de> wrote:> # HG changeset patch > # User Olaf Hering <olaf@aepfle.de> > # Date 1305824384 -7200 > # Node ID cb0ed92e451d06789cb1a0ba14967bda3a7a5bcb > # Parent 9c492ce99bbe24e1b4bbe43c754f136ac19a372f > gcc-4.6 compile fix: tools/xenstore/xenstored_core.c > > xenstored_core.c: In function ''trace'': > xenstored_core.c:133:11: error: variable ''dummy'' set but not used > [-Werror=unused-but-set-variable] > xenstored_core.c: In function ''trigger_reopen_log'': > xenstored_core.c:203:6: error: variable ''dummy'' set but not used > [-Werror=unused-but-set-variable]I applied the first couple of these patches, but... We don''t set -Werror=unused-but-set-variable, so we don''t actually need these fixes, do we? Unless they are cleanups or fixes in some other way? -- Keir> Signed-off-by: Olaf Hering <olaf@aepfle.de> > > diff -r 9c492ce99bbe -r cb0ed92e451d tools/xenstore/xenstored_core.c > --- a/tools/xenstore/xenstored_core.c Thu May 19 18:59:42 2011 +0200 > +++ b/tools/xenstore/xenstored_core.c Thu May 19 18:59:44 2011 +0200 > @@ -130,7 +130,7 @@ void trace(const char *fmt, ...) > va_list arglist; > char *str; > char sbuf[1024]; > - int ret, dummy; > + int ret; > > if (tracefd < 0) > return; > @@ -141,7 +141,10 @@ void trace(const char *fmt, ...) > va_end(arglist); > > if (ret <= 1024) { > - dummy = write(tracefd, sbuf, ret); > + if (write(tracefd, sbuf, ret) < 0) { > + close(tracefd); > + tracefd = -1; > + } > return; > } > > @@ -149,7 +152,10 @@ void trace(const char *fmt, ...) > va_start(arglist, fmt); > str = talloc_vasprintf(NULL, fmt, arglist); > va_end(arglist); > - dummy = write(tracefd, str, strlen(str)); > + if (write(tracefd, str, strlen(str)) < 0) { > + close(tracefd); > + tracefd = -1; > + } > talloc_free(str); > } > > @@ -200,8 +206,12 @@ void trace_destroy(const void *data, con > static void trigger_reopen_log(int signal __attribute__((unused))) > { > char c = ''A''; > - int dummy; > - dummy = write(reopen_log_pipe[1], &c, 1); > + if (reopen_log_pipe[1] < 0) > + return; > + if (write(reopen_log_pipe[1], &c, 1) < 0) { > + close(reopen_log_pipe[1]); > + reopen_log_pipe[1] = -1; > + } > } > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Campbell
2011-May-20 08:28 UTC
Re: [Xen-devel] [PATCH 00 of 45] gcc 4.6 compile fixes for xen-unstable
On Fri, 2011-05-20 at 08:38 +0100, Jan Beulich wrote:> >>> On 19.05.11 at 21:05, Olaf Hering <olaf@aepfle.de> wrote: > > The following series fix compile errors with gcc 4.6. > > Please review if each change is correct. > > Hmm, this large amount of changesI knew this warning would be trouble when I first saw it...> makes we wonder whether we > shouldn''t simply turn of the unused-but-set-variable warning > altogether, or at least not have it be an error. Not the least > because I''m not sure it''d be nice to backport all of these changes > into older trees (which obviously would suffer mostly the same > problems when built with 4.6 or newer).Perhaps we should do both -- take the fixes into unstable and disable the warning in 4.1? Ian.> > Jan > > > Thanks, > > > > Olaf > > > > tools/console/client/main.c | 3 -- > > tools/debugger/gdbsx/gx/gx_comm.c | 2 - > > tools/firmware/rombios/32bit/tcgbios/tcgbios.c | 2 - > > tools/libxc/xc_domain_restore.c | 2 - > > tools/libxc/xc_tmem.c | 3 -- > > tools/libxl/libxl.c | 6 ++--- > > tools/libxl/libxl_dom.c | 4 +-- > > tools/libxl/libxl_pci.c | 2 - > > tools/libxl/libxl_utils.c | 2 - > > tools/libxl/libxlu_cfg.c | 2 - > > tools/libxl/xl_cmdimpl.c | 5 ---- > > tools/misc/gtraceview.c | 3 -- > > tools/python/xen/lowlevel/checkpoint/libcheckpoint.c | 6 +---- > > tools/python/xen/lowlevel/netlink/libnetlink.c | 3 -- > > tools/xcutils/xc_restore.c | 3 -- > > tools/xenstat/xentop/xentop.c | 8 +------ > > tools/xenstore/xenstored_core.c | 20 ++++++++++++++----- > > xen/arch/x86/acpi/cpu_idle.c | 2 - > > xen/arch/x86/cpu/amd.c | 3 -- > > xen/arch/x86/cpu/intel.c | 3 -- > > xen/arch/x86/cpu/intel_cacheinfo.c | 7 ------ > > xen/arch/x86/cpu/mcheck/mce.c | 15 +++----------- > > xen/arch/x86/cpu/mcheck/vmce.c | 2 - > > xen/arch/x86/hvm/emulate.c | 3 -- > > xen/arch/x86/hvm/hvm.c | 5 +--- > > xen/arch/x86/hvm/viridian.c | 5 ---- > > xen/arch/x86/microcode_amd.c | 3 -- > > xen/arch/x86/mm.c | 2 - > > xen/arch/x86/mm/mem_sharing.c | 2 - > > xen/arch/x86/mm/p2m-pod.c | 3 -- > > xen/arch/x86/mm/p2m.c | 2 - > > xen/arch/x86/mm/shadow/multi.c | 4 +-- > > xen/arch/x86/msi.c | 9 -------- > > xen/arch/x86/time.c | 5 ++-- > > xen/arch/x86/x86_64/mm.c | 4 --- > > xen/common/cpupool.c | 2 - > > xen/common/grant_table.c | 2 - > > xen/common/kexec.c | 2 - > > xen/common/sched_credit2.c | 4 --- > > xen/common/tmem.c | 4 +-- > > xen/common/tmem_xen.c | 4 +-- > > xen/common/unlzo.c | 3 -- > > xen/drivers/passthrough/vtd/intremap.c | 6 ----- > > 43 files changed, 59 insertions(+), 123 deletions(-) > > > > _______________________________________________ > > Xen-devel mailing list > > Xen-devel@lists.xensource.com > > http://lists.xensource.com/xen-devel > > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Campbell
2011-May-20 08:30 UTC
Re: [Xen-devel] [PATCH 03 of 45] gcc-4.6 compile fix: tools/xenstore/xenstored_core.c
On Fri, 2011-05-20 at 09:21 +0100, Keir Fraser wrote:> On 19/05/2011 20:05, "Olaf Hering" <olaf@aepfle.de> wrote: > > > # HG changeset patch > > # User Olaf Hering <olaf@aepfle.de> > > # Date 1305824384 -7200 > > # Node ID cb0ed92e451d06789cb1a0ba14967bda3a7a5bcb > > # Parent 9c492ce99bbe24e1b4bbe43c754f136ac19a372f > > gcc-4.6 compile fix: tools/xenstore/xenstored_core.c > > > > xenstored_core.c: In function ''trace'': > > xenstored_core.c:133:11: error: variable ''dummy'' set but not used > > [-Werror=unused-but-set-variable] > > xenstored_core.c: In function ''trigger_reopen_log'': > > xenstored_core.c:203:6: error: variable ''dummy'' set but not used > > [-Werror=unused-but-set-variable] > > I applied the first couple of these patches, but... We don''t set > -Werror=unused-but-set-variable, so we don''t actually need these fixes, do > we? Unless they are cleanups or fixes in some other way?gcc 4.6 adds it to the default set of Werrors. Ian.> > -- Keir > > > Signed-off-by: Olaf Hering <olaf@aepfle.de> > > > > diff -r 9c492ce99bbe -r cb0ed92e451d tools/xenstore/xenstored_core.c > > --- a/tools/xenstore/xenstored_core.c Thu May 19 18:59:42 2011 +0200 > > +++ b/tools/xenstore/xenstored_core.c Thu May 19 18:59:44 2011 +0200 > > @@ -130,7 +130,7 @@ void trace(const char *fmt, ...) > > va_list arglist; > > char *str; > > char sbuf[1024]; > > - int ret, dummy; > > + int ret; > > > > if (tracefd < 0) > > return; > > @@ -141,7 +141,10 @@ void trace(const char *fmt, ...) > > va_end(arglist); > > > > if (ret <= 1024) { > > - dummy = write(tracefd, sbuf, ret); > > + if (write(tracefd, sbuf, ret) < 0) { > > + close(tracefd); > > + tracefd = -1; > > + } > > return; > > } > > > > @@ -149,7 +152,10 @@ void trace(const char *fmt, ...) > > va_start(arglist, fmt); > > str = talloc_vasprintf(NULL, fmt, arglist); > > va_end(arglist); > > - dummy = write(tracefd, str, strlen(str)); > > + if (write(tracefd, str, strlen(str)) < 0) { > > + close(tracefd); > > + tracefd = -1; > > + } > > talloc_free(str); > > } > > > > @@ -200,8 +206,12 @@ void trace_destroy(const void *data, con > > static void trigger_reopen_log(int signal __attribute__((unused))) > > { > > char c = ''A''; > > - int dummy; > > - dummy = write(reopen_log_pipe[1], &c, 1); > > + if (reopen_log_pipe[1] < 0) > > + return; > > + if (write(reopen_log_pipe[1], &c, 1) < 0) { > > + close(reopen_log_pipe[1]); > > + reopen_log_pipe[1] = -1; > > + } > > } > > > > > > > > _______________________________________________ > > Xen-devel mailing list > > Xen-devel@lists.xensource.com > > http://lists.xensource.com/xen-devel > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Olaf Hering
2011-May-20 08:35 UTC
Re: [Xen-devel] [PATCH 03 of 45] gcc-4.6 compile fix: tools/xenstore/xenstored_core.c
On Fri, May 20, Keir Fraser wrote:> On 19/05/2011 20:05, "Olaf Hering" <olaf@aepfle.de> wrote: > > > # HG changeset patch > > # User Olaf Hering <olaf@aepfle.de> > > # Date 1305824384 -7200 > > # Node ID cb0ed92e451d06789cb1a0ba14967bda3a7a5bcb > > # Parent 9c492ce99bbe24e1b4bbe43c754f136ac19a372f > > gcc-4.6 compile fix: tools/xenstore/xenstored_core.c > > > > xenstored_core.c: In function ''trace'': > > xenstored_core.c:133:11: error: variable ''dummy'' set but not used > > [-Werror=unused-but-set-variable] > > xenstored_core.c: In function ''trigger_reopen_log'': > > xenstored_core.c:203:6: error: variable ''dummy'' set but not used > > [-Werror=unused-but-set-variable] > > I applied the first couple of these patches, but... We don''t set > -Werror=unused-but-set-variable, so we don''t actually need these fixes, do > we? Unless they are cleanups or fixes in some other way?Its the default of gcc 4.6, at least it fails to compile in openSuSE Factory. Olaf _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2011-May-20 08:38 UTC
Re: [Xen-devel] [PATCH 29 of 45] gcc-4.6 compile fix: xen/arch/x86/cpu/intel.c
On 20/05/2011 08:55, "Jan Beulich" <JBeulich@novell.com> wrote:>> intel.c: In function ''set_cpuidmask'': >> intel.c:36:14: error: variable ''extra'' set but not used >> [-Werror=unused-but-set-variable] > > No, please don''t push this - it was a mistake that "extra" wasn''t > used, and > http://lists.xensource.com/archives/html/xen-devel/2011-05/msg00753.html > corrects this.Ha, too late, that was one of the patches I cherry picked as a reasonable cleanup. Your patch will have to reintroduce "extra". -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2011-May-20 08:39 UTC
Re: [Xen-devel] [PATCH 00 of 45] gcc 4.6 compile fixes for xen-unstable
On 20/05/2011 09:28, "Ian Campbell" <Ian.Campbell@citrix.com> wrote:>> makes we wonder whether we >> shouldn''t simply turn of the unused-but-set-variable warning >> altogether, or at least not have it be an error. Not the least >> because I''m not sure it''d be nice to backport all of these changes >> into older trees (which obviously would suffer mostly the same >> problems when built with 4.6 or newer). > > Perhaps we should do both -- take the fixes into unstable and disable > the warning in 4.1?We should just disable the warning. Job done, don''t need to take the uglier "fixes". -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2011-May-20 08:41 UTC
Re: [Xen-devel] [PATCH 03 of 45] gcc-4.6 compile fix: tools/xenstore/xenstored_core.c
On 20/05/2011 09:30, "Ian Campbell" <Ian.Campbell@citrix.com> wrote:>> I applied the first couple of these patches, but... We don''t set >> -Werror=unused-but-set-variable, so we don''t actually need these fixes, do >> we? Unless they are cleanups or fixes in some other way? > > gcc 4.6 adds it to the default set of Werrors.I''ll take a patch from someone to remove it from the default set, please. Until plenty of people are using gcc 4.6, it''ll only get broken again and again anyway, even if we applied all the current fixes. I''ve applied all the patches that I considered nice cleanups, I''d like to drop the rest. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Olaf Hering
2011-May-20 14:38 UTC
Re: [Xen-devel] [PATCH 03 of 45] gcc-4.6 compile fix: tools/xenstore/xenstored_core.c
On Fri, May 20, Keir Fraser wrote:> On 20/05/2011 09:30, "Ian Campbell" <Ian.Campbell@citrix.com> wrote: > > >> I applied the first couple of these patches, but... We don''t set > >> -Werror=unused-but-set-variable, so we don''t actually need these fixes, do > >> we? Unless they are cleanups or fixes in some other way? > > > > gcc 4.6 adds it to the default set of Werrors. > > I''ll take a patch from someone to remove it from the default set, please.I will send a tested patch. It may hide some bugs. In one of the patches for tools/ some function returns 0 unconditionally instead of the rc variable. Olaf _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2011-May-20 14:58 UTC
Re: [Xen-devel] [PATCH 03 of 45] gcc-4.6 compile fix: tools/xenstore/xenstored_core.c
On 20/05/2011 15:38, "Olaf Hering" <olaf@aepfle.de> wrote:> On Fri, May 20, Keir Fraser wrote: > >> On 20/05/2011 09:30, "Ian Campbell" <Ian.Campbell@citrix.com> wrote: >> >>>> I applied the first couple of these patches, but... We don''t set >>>> -Werror=unused-but-set-variable, so we don''t actually need these fixes, do >>>> we? Unless they are cleanups or fixes in some other way? >>> >>> gcc 4.6 adds it to the default set of Werrors. >> >> I''ll take a patch from someone to remove it from the default set, please. > > I will send a tested patch. > > It may hide some bugs. In one of the patches for tools/ some function > returns 0 unconditionally instead of the rc variable.Oh dear. Well, the tools/libxl maintainers are free to keep the new warnings, and take your fixes, if they wish, clearly needing the help. ;-) -- Keir> Olaf_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Olaf Hering
2011-May-20 16:11 UTC
Re: [Xen-devel] [PATCH 03 of 45] gcc-4.6 compile fix: tools/xenstore/xenstored_core.c
On Fri, May 20, Keir Fraser wrote:> Oh dear. ...I think the following patch is good for 4.1 and older, but xen-unstable should be fixed (and bugfixes backported) because disabling the warning may hide bugs. Is adding the __attribute__ such a burden? Olaf gcc-4.6 compile fix: build with -Wno-unused-but-set-variable Avoid "error: variable ''unused'' set but not used [-Werror=unused-but-set-variable]" with gcc 4.6. Signed-off-by: Olaf Hering <olaf@aepfle.de> --- Config.mk | 1 + 1 file changed, 1 insertion(+) Index: xen-unstable.hg-4.2.23363/Config.mk ==================================================================--- xen-unstable.hg-4.2.23363.orig/Config.mk +++ xen-unstable.hg-4.2.23363/Config.mk @@ -146,6 +146,7 @@ CFLAGS-$(clang) += -Wno-parentheses -Wno $(call cc-option-add,HOSTCFLAGS,HOSTCC,-Wdeclaration-after-statement) $(call cc-option-add,CFLAGS,CC,-Wdeclaration-after-statement) +$(call cc-option-add,CFLAGS,CC,-Wno-unused-but-set-variable) LDFLAGS += $(foreach i, $(EXTRA_LIB), -L$(i)) CFLAGS += $(foreach i, $(EXTRA_INCLUDES), -I$(i)) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Jackson
2011-May-20 17:23 UTC
Re: [Xen-devel] [PATCH 00 of 45] gcc 4.6 compile fixes for xen-unstable
Keir Fraser writes ("Re: [Xen-devel] [PATCH 00 of 45] gcc 4.6 compile fixes for xen-unstable"):> We should just disable the warning. Job done, don''t need to take the uglier > "fixes".I don''t think we really want lots of unused variables being assigned to, do we ? In some cases the function computing the value may be doing pointless work and so this might even improve performance. So I think -Wset-but-unused-variable is fine with -Werror too in the long run but we''ll have to have it with -Wno-error-set-but-unused-variable (or whatever the syntax is) until the compiler becomes widespread. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2011-May-21 06:50 UTC
Re: [Xen-devel] [PATCH 03 of 45] gcc-4.6 compile fix: tools/xenstore/xenstored_core.c
On 20/05/2011 17:11, "Olaf Hering" <olaf@aepfle.de> wrote:> On Fri, May 20, Keir Fraser wrote: > >> Oh dear. ... > > I think the following patch is good for 4.1 and older, but xen-unstable > should be fixed (and bugfixes backported) because disabling the warning > may hide bugs. Is adding the __attribute__ such a burden?...and the ifdefs? Ugly. And for no bugs fixed so far in the hypervisor. As I said, I don''t maintain the toolstack, those guys can make their own choice. -- Keir> Olaf > > > gcc-4.6 compile fix: build with -Wno-unused-but-set-variable > > Avoid "error: variable ''unused'' set but not used > [-Werror=unused-but-set-variable]" > with gcc 4.6. > > Signed-off-by: Olaf Hering <olaf@aepfle.de> > > --- > Config.mk | 1 + > 1 file changed, 1 insertion(+) > > Index: xen-unstable.hg-4.2.23363/Config.mk > ==================================================================> --- xen-unstable.hg-4.2.23363.orig/Config.mk > +++ xen-unstable.hg-4.2.23363/Config.mk > @@ -146,6 +146,7 @@ CFLAGS-$(clang) += -Wno-parentheses -Wno > > $(call cc-option-add,HOSTCFLAGS,HOSTCC,-Wdeclaration-after-statement) > $(call cc-option-add,CFLAGS,CC,-Wdeclaration-after-statement) > +$(call cc-option-add,CFLAGS,CC,-Wno-unused-but-set-variable) > > LDFLAGS += $(foreach i, $(EXTRA_LIB), -L$(i)) > CFLAGS += $(foreach i, $(EXTRA_INCLUDES), -I$(i))_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel