[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 1/7] xen/arm: Make make_cpus_node() compile at -Og
When compiling at -Og: domain_build.c: In function 'make_cpus_node': domain_build.c:926:12: error: 'clock_valid' may be used uninitialized in this function [-Werror=maybe-uninitialized] 926 | if ( clock_valid ) | ^ The compiler hasn't spotted that clock_valid is always initialised after the "if ( !compatible )" check. Initialise clock_valid to false. Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> --- CC: Stefano Stabellini <sstabellini@xxxxxxxxxx> CC: Julien Grall <julien@xxxxxxx> CC: Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx> --- xen/arch/arm/domain_build.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index b1d7b9849f..b10f5c8f85 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -831,7 +831,7 @@ static int __init make_cpus_node(const struct domain *d, void *fdt) /* Placeholder for cpu@ + a 32-bit hexadecimal number + \0 */ char buf[13]; u32 clock_frequency; - bool clock_valid; + bool clock_valid = false; uint64_t mpidr_aff; dt_dprintk("Create cpus node\n"); -- 2.11.0
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |