From: Peter Dinda Date: Mon, 9 Jan 2017 20:14:55 +0000 (-0600) Subject: Compile fixes for GCC 5.4+ (core VMM only) X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=commitdiff_plain;h=b8836aa7353bf563bf26fdbc6ef3344eb108181c;p=palacios.git Compile fixes for GCC 5.4+ (core VMM only) - Correct new undefined behavior warning (overflow) - Correct kconfig tool build (non-static inline function) --- diff --git a/palacios/src/palacios/vmm_paging_debug.h b/palacios/src/palacios/vmm_paging_debug.h index d4b4536..8ce5f87 100644 --- a/palacios/src/palacios/vmm_paging_debug.h +++ b/palacios/src/palacios/vmm_paging_debug.h @@ -222,7 +222,7 @@ static int print_page_walk_cb(struct guest_info * info, page_type_t type, addr_t pdpe64_t * pdp = (pdpe64_t *)page_ptr; PrintDebug(info->vm_info, info, "PDPE64 Page\n"); for (i = 0; i < MAX_PDPE64_ENTRIES; i++) { - tmp_vaddr = 4096 * MAX_PTE64_ENTRIES * MAX_PDE64_ENTRIES * i; + tmp_vaddr = 4096UL * MAX_PTE64_ENTRIES * MAX_PDE64_ENTRIES * i; tmp_vaddr += vaddr; if (pdp[i].present) PrintPDPE64(tmp_vaddr, &(pdp[i])); @@ -261,7 +261,7 @@ static int print_page_walk_cb(struct guest_info * info, page_type_t type, addr_t pdpe32pae_t * pdp = (pdpe32pae_t *)page_ptr; PrintDebug(info->vm_info, info, "PDPE32PAE Page\n"); for (i = 0; i < MAX_PDPE32PAE_ENTRIES; i++) { - tmp_vaddr = 4096 * MAX_PTE32PAE_ENTRIES * MAX_PDE32PAE_ENTRIES * i; + tmp_vaddr = 4096UL * MAX_PTE32PAE_ENTRIES * MAX_PDE32PAE_ENTRIES * i; tmp_vaddr += vaddr; if (pdp[i].present) PrintPDPE32PAE(tmp_vaddr, &(pdp[i])); @@ -300,7 +300,7 @@ static int print_page_walk_cb(struct guest_info * info, page_type_t type, addr_t pde32_t * pd = (pde32_t *)page_ptr; PrintDebug(info->vm_info, info, "PDE32 Page\n"); for (i = 0; i < MAX_PTE32_ENTRIES; i++) { - tmp_vaddr = 4096 * MAX_PTE32_ENTRIES * i; + tmp_vaddr = 4096UL * MAX_PTE32_ENTRIES * i; tmp_vaddr += vaddr; if (pd[i].present) PrintPDE32(tmp_vaddr, &(pd[i])); diff --git a/scripts/kconfig/zconf.hash.c_shipped b/scripts/kconfig/zconf.hash.c_shipped index 345f0fc..76a3711 100644 --- a/scripts/kconfig/zconf.hash.c_shipped +++ b/scripts/kconfig/zconf.hash.c_shipped @@ -154,7 +154,7 @@ static struct kconf_id_strings_t kconf_id_strings_contents = }; #define kconf_id_strings ((const char *) &kconf_id_strings_contents) #ifdef __GNUC__ -__inline +static __inline #endif struct kconf_id * kconf_id_lookup (register const char *str, register unsigned int len)