Simplify identification of TLS 1.3 labels in unit test suite

Signed-off-by: Hanno Becker <hanno.becker@arm.com>
diff --git a/library/ssl_tls13_keys.c b/library/ssl_tls13_keys.c
index a924dc8..88b1b8a 100644
--- a/library/ssl_tls13_keys.c
+++ b/library/ssl_tls13_keys.c
@@ -28,7 +28,7 @@
 #include <stdint.h>
 #include <string.h>
 
-#define MBEDTLS_SSL_TLS1_3_LABEL( idx, name, string )       \
+#define MBEDTLS_SSL_TLS1_3_LABEL( name, string )       \
     .name = string,
 
 struct mbedtls_ssl_tls1_3_labels_struct const mbedtls_ssl_tls1_3_labels =
diff --git a/library/ssl_tls13_keys.h b/library/ssl_tls13_keys.h
index 33becd6..03235e5 100644
--- a/library/ssl_tls13_keys.h
+++ b/library/ssl_tls13_keys.h
@@ -23,26 +23,26 @@
  * the point of use. See e.g. the definition of mbedtls_ssl_tls1_3_labels_union
  * below. */
 #define MBEDTLS_SSL_TLS1_3_LABEL_LIST                               \
-    MBEDTLS_SSL_TLS1_3_LABEL( 0,  finished    , "finished"     ) \
-    MBEDTLS_SSL_TLS1_3_LABEL( 1,  resumption  , "resumption"   ) \
-    MBEDTLS_SSL_TLS1_3_LABEL( 2,  traffic_upd , "traffic upd"  ) \
-    MBEDTLS_SSL_TLS1_3_LABEL( 3,  exporter    , "exporter"     ) \
-    MBEDTLS_SSL_TLS1_3_LABEL( 4,  key         , "key"          ) \
-    MBEDTLS_SSL_TLS1_3_LABEL( 5,  iv          , "iv"           ) \
-    MBEDTLS_SSL_TLS1_3_LABEL( 6,  c_hs_traffic, "c hs traffic" ) \
-    MBEDTLS_SSL_TLS1_3_LABEL( 7,  c_ap_traffic, "c ap traffic" ) \
-    MBEDTLS_SSL_TLS1_3_LABEL( 8,  c_e_traffic , "c e traffic"  ) \
-    MBEDTLS_SSL_TLS1_3_LABEL( 9,  s_hs_traffic, "s hs traffic" ) \
-    MBEDTLS_SSL_TLS1_3_LABEL( 10, s_ap_traffic, "s ap traffic" ) \
-    MBEDTLS_SSL_TLS1_3_LABEL( 11, s_e_traffic , "s e traffic"  ) \
-    MBEDTLS_SSL_TLS1_3_LABEL( 12, e_exp_master, "e exp master" ) \
-    MBEDTLS_SSL_TLS1_3_LABEL( 13, res_master  , "res master"   ) \
-    MBEDTLS_SSL_TLS1_3_LABEL( 14, exp_master  , "exp master"   ) \
-    MBEDTLS_SSL_TLS1_3_LABEL( 15, ext_binder  , "ext binder"   ) \
-    MBEDTLS_SSL_TLS1_3_LABEL( 16, res_binder  , "res binder"   ) \
-    MBEDTLS_SSL_TLS1_3_LABEL( 17, derived     , "derived"      )
+    MBEDTLS_SSL_TLS1_3_LABEL( finished    , "finished"     ) \
+    MBEDTLS_SSL_TLS1_3_LABEL( resumption  , "resumption"   ) \
+    MBEDTLS_SSL_TLS1_3_LABEL( traffic_upd , "traffic upd"  ) \
+    MBEDTLS_SSL_TLS1_3_LABEL( exporter    , "exporter"     ) \
+    MBEDTLS_SSL_TLS1_3_LABEL( key         , "key"          ) \
+    MBEDTLS_SSL_TLS1_3_LABEL( iv          , "iv"           ) \
+    MBEDTLS_SSL_TLS1_3_LABEL( c_hs_traffic, "c hs traffic" ) \
+    MBEDTLS_SSL_TLS1_3_LABEL( c_ap_traffic, "c ap traffic" ) \
+    MBEDTLS_SSL_TLS1_3_LABEL( c_e_traffic , "c e traffic"  ) \
+    MBEDTLS_SSL_TLS1_3_LABEL( s_hs_traffic, "s hs traffic" ) \
+    MBEDTLS_SSL_TLS1_3_LABEL( s_ap_traffic, "s ap traffic" ) \
+    MBEDTLS_SSL_TLS1_3_LABEL( s_e_traffic , "s e traffic"  ) \
+    MBEDTLS_SSL_TLS1_3_LABEL( e_exp_master, "e exp master" ) \
+    MBEDTLS_SSL_TLS1_3_LABEL( res_master  , "res master"   ) \
+    MBEDTLS_SSL_TLS1_3_LABEL( exp_master  , "exp master"   ) \
+    MBEDTLS_SSL_TLS1_3_LABEL( ext_binder  , "ext binder"   ) \
+    MBEDTLS_SSL_TLS1_3_LABEL( res_binder  , "res binder"   ) \
+    MBEDTLS_SSL_TLS1_3_LABEL( derived     , "derived"      )
 
-#define MBEDTLS_SSL_TLS1_3_LABEL( idx, name, string )       \
+#define MBEDTLS_SSL_TLS1_3_LABEL( name, string )       \
     const unsigned char name    [ sizeof(string) - 1 ];
 
 union mbedtls_ssl_tls1_3_labels_union
diff --git a/tests/suites/test_suite_ssl.function b/tests/suites/test_suite_ssl.function
index 1532429..9fcf367 100644
--- a/tests/suites/test_suite_ssl.function
+++ b/tests/suites/test_suite_ssl.function
@@ -12,10 +12,13 @@
 
 #include <test/constant_flow.h>
 
-#define MBEDTLS_SSL_TLS1_3_LABEL( idx, name, string )   \
-    const int tls1_3_label_ ## name = idx;
+enum
+{
+#define MBEDTLS_SSL_TLS1_3_LABEL( name, string )   \
+     tls1_3_label_ ## name,
 MBEDTLS_SSL_TLS1_3_LABEL_LIST
 #undef MBEDTLS_SSL_TLS1_3_LABEL
+};
 
 typedef struct log_pattern
 {
@@ -3687,8 +3690,8 @@
 
     unsigned char const *lbl = NULL;
     size_t lbl_len;
-#define MBEDTLS_SSL_TLS1_3_LABEL( idx, name, string )                   \
-    if( label_idx == tls1_3_label_ ## name )                            \
+#define MBEDTLS_SSL_TLS1_3_LABEL( name, string )                        \
+    if( label_idx == (int) tls1_3_label_ ## name )                      \
     {                                                                   \
         lbl = mbedtls_ssl_tls1_3_labels.name;                           \
         lbl_len = sizeof( mbedtls_ssl_tls1_3_labels.name );             \
@@ -3773,8 +3776,8 @@
 
     unsigned char const *lbl = NULL;
     size_t lbl_len;
-#define MBEDTLS_SSL_TLS1_3_LABEL( idx, name, string )                   \
-    if( label_idx == tls1_3_label_ ## name )                            \
+#define MBEDTLS_SSL_TLS1_3_LABEL( name, string )                        \
+    if( label_idx == (int) tls1_3_label_ ## name )                      \
     {                                                                   \
         lbl = mbedtls_ssl_tls1_3_labels.name;                           \
         lbl_len = sizeof( mbedtls_ssl_tls1_3_labels.name );             \