sim_mad.c:160:13: error: use of GNU 'missing =' extension in designator [-Werror,-Wgnu-designator] [TRAP_128] encode_trap128, ^ = sim_mad.c:161:13: error: use of GNU 'missing =' extension in designator [-Werror,-Wgnu-designator] [TRAP_144] encode_trap144, ^ = sim_mad.c:163:18: error: use of GNU 'missing =' extension in designator [-Werror,-Wgnu-designator] [TRAP_NUM_LAST] 0, ^ = Signed-off-by: Honggang Li <honli@xxxxxxxxxx> --- ibsim/sim_mad.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ibsim/sim_mad.c b/ibsim/sim_mad.c index edb23952b47a..1660b84dbe4b 100644 --- a/ibsim/sim_mad.c +++ b/ibsim/sim_mad.c @@ -157,10 +157,10 @@ static Smpfn * get_smp_handler(unsigned class_id, unsigned attr_id) } static EncodeTrapfn *encodetrap[] = { - [TRAP_128] encode_trap128, - [TRAP_144] encode_trap144, + [TRAP_128] = encode_trap128, + [TRAP_144] = encode_trap144, - [TRAP_NUM_LAST] 0, + [TRAP_NUM_LAST] = 0, }; extern Node *nodes; -- 2.15.0-rc1