File gcc9-ignore-warnings.patch of Package xen.16552
References: bsc#1121391
Error in generic.c:
generic.c: In function 'print_mtrr_state':
generic.c:177:11: error: '%0*lx' directive output between 1 and 1073741823 bytes may cause result to exceed 'INT_MAX' [-Werror=format-overflow=]
177 | printk("%s %u base %0*"PRIx64"000 mask %0*"PRIx64"000 %s\n",
--- a/xen/arch/x86/cpu/mtrr/generic.c
+++ b/xen/arch/x86/cpu/mtrr/generic.c
@@ -182,7 +182,7 @@ static void __init print_fixed(unsigned
static void __init print_mtrr_state(const char *level)
{
unsigned int i;
- int width;
+ unsigned char width; /* gcc9 doesn't like plain "int" here */
printk("%sMTRR default type: %s\n", level,
mtrr_attrib_to_str(mtrr_state.def_type));