diff mbox series

[ibsim,06/23] sim_mad.c: fix a clang compilation error

Message ID 20190102131318.5765-6-honli@redhat.com (mailing list archive)
State Not Applicable
Headers show
Series [ibsim,01/23] move sim_cmd_file into ibsim/sim_cmd.c | expand

Commit Message

Honggang LI Jan. 2, 2019, 1:13 p.m. UTC
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@redhat.com>
---
 ibsim/sim_mad.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Hal Rosenstock Jan. 3, 2019, 3:40 p.m. UTC | #1
On 1/2/2019 8:13 AM, Honggang Li wrote:
> 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@redhat.com>

Thanks. Applied.

-- Hal
diff mbox series

Patch

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;