On 12 Oct 2022 13:38, Andrew Burgess via Gdb-patches wrote: > --- a/sim/common/cgen-run.c > +++ b/sim/common/cgen-run.c > @@ -242,6 +242,11 @@ engine_run_n (SIM_DESC sd, int next_cpu_nr, int nr_cpus, int max_insns, int fast > prime_cpu (cpu, max_insns); > } > > + /* Ensure the remaining engine_fns slots are initialized, this silences a > + compiler warning when engine_fns is used below. */ > + for (i = nr_cpus; i < MAX_NR_PROCESSORS; ++i) > + engine_fns[i] = NULL; engine_fns is declared in this func. why not assign it and let gcc handle the rest ? - ENGINE_FN *engine_fns[MAX_NR_PROCESSORS]; + ENGINE_FN *engine_fns[MAX_NR_PROCESSORS] = {}; -mike