فهرست منبع

Fix -Wgnu-designator clang warnings

Clang warns about the use of old GNU-style designators. To avoid this,
use the C99 designators instead.
Marius Melzer 2 سال پیش
والد
کامیت
3564b811b8
1فایلهای تغییر یافته به همراه7 افزوده شده و 7 حذف شده
  1. 7 7
      libc/stdlib/random.c

+ 7 - 7
libc/stdlib/random.c

@@ -139,8 +139,8 @@ static struct random_data unsafe_state =
        in the initialization of randtbl) because the state table pointer is set
        in the initialization of randtbl) because the state table pointer is set
        to point to randtbl[1] (as explained below).)  */
        to point to randtbl[1] (as explained below).)  */
 
 
-    fptr : &randtbl[SEP_3 + 1],
-    rptr : &randtbl[1],
+    .fptr = &randtbl[SEP_3 + 1],
+    .rptr = &randtbl[1],
 
 
     /* The following things are the pointer to the state information table,
     /* The following things are the pointer to the state information table,
        the type of the current generator, the degree of the current polynomial
        the type of the current generator, the degree of the current polynomial
@@ -152,13 +152,13 @@ static struct random_data unsafe_state =
        indexing every time to find the address of the last element to see if
        indexing every time to find the address of the last element to see if
        the front and rear pointers have wrapped.  */
        the front and rear pointers have wrapped.  */
 
 
-    state : &randtbl[1],
+    .state = &randtbl[1],
 
 
-    rand_type : TYPE_3,
-    rand_deg : DEG_3,
-    rand_sep : SEP_3,
+    .rand_type = TYPE_3,
+    .rand_deg = DEG_3,
+    .rand_sep = SEP_3,
 
 
-    end_ptr : &randtbl[sizeof (randtbl) / sizeof (randtbl[0])]
+    .end_ptr = &randtbl[sizeof (randtbl) / sizeof (randtbl[0])]
 };
 };