# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID d88e98fd4f7a6d007b3f905a1f3c36c53fd7427a
# Parent 7f732bba3ed4a16fa8599a99b8a37ace90add049
Fix compiler warnings when shadow debugging is enabled.
Fix two classes of warnings when debugging of shadow code is enabled:
- The type_info field in pfn_info is a long, so use a %lx format
specifier when printing it.
- Fix a warning about uninitialized use of eff_guest_pte.
Signed-off-by: Michael Vrable <mvrable@xxxxxxxxxxx>
diff -r 7f732bba3ed4 -r d88e98fd4f7a xen/arch/x86/shadow32.c
--- a/xen/arch/x86/shadow32.c Thu Sep 29 18:59:18 2005
+++ b/xen/arch/x86/shadow32.c Thu Sep 29 22:44:34 2005
@@ -1836,7 +1836,7 @@
}
#endif
- FSH_LOG("%s(gpfn=%lx, mfn=%lx) c=%08x t=%08x", __func__,
+ FSH_LOG("%s(gpfn=%lx, mfn=%lx) c=%08x t=%08lx", __func__,
gpfn, mfn, page->count_info, page->u.inuse.type_info);
// XXX this will require some more thought... Cross-domain sharing and
@@ -3017,7 +3017,7 @@
l1_pgentry_t guest_pte = *p_guest_pte;
l1_pgentry_t shadow_pte = *p_shadow_pte;
l1_pgentry_t snapshot_pte = p_snapshot_pte ? *p_snapshot_pte : l1e_empty();
- l1_pgentry_t eff_guest_pte;
+ l1_pgentry_t eff_guest_pte = l1e_empty();
unsigned long mask, eff_guest_pfn, eff_guest_mfn, shadow_mfn;
int errors = 0, guest_writable;
int page_table_page;
@@ -3074,7 +3074,7 @@
if ( (l1e_get_flags(shadow_pte) & _PAGE_RW ) && !guest_writable )
{
- printk("eff_guest_pfn=%lx eff_guest_mfn=%lx shadow_mfn=%lx t=0x%08x
page_table_page=%d\n",
+ printk("eff_guest_pfn=%lx eff_guest_mfn=%lx shadow_mfn=%lx t=%lx
page_table_page=%d\n",
eff_guest_pfn, eff_guest_mfn, shadow_mfn,
frame_table[eff_guest_mfn].u.inuse.type_info,
page_table_page);
@@ -3085,7 +3085,7 @@
(l1e_get_flags(shadow_pte) & _PAGE_RW ) &&
!(guest_writable && (l1e_get_flags(eff_guest_pte) & _PAGE_DIRTY)) )
{
- printk("eff_guest_pfn=%lx eff_guest_mfn=%lx shadow_mfn=%lx t=0x%08x
page_table_page=%d\n",
+ printk("eff_guest_pfn=%lx eff_guest_mfn=%lx shadow_mfn=%lx t=%lx
page_table_page=%d\n",
eff_guest_pfn, eff_guest_mfn, shadow_mfn,
frame_table[eff_guest_mfn].u.inuse.type_info,
page_table_page);
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|