summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
authorMarius Melzer <marius.melzer@kernkonzept.com>2023-12-20 13:31:47 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2023-12-22 10:48:26 +0100
commit3564b811b8539e26e22a237acd9097c847851d78 (patch)
treef80d3762e9397977a45f478afac87ca56eb0c4a4 /libc
parentfc3b6dc46a80e1f4aa468472aa6c7083f3bc6581 (diff)
Fix -Wgnu-designator clang warnings
Clang warns about the use of old GNU-style designators. To avoid this, use the C99 designators instead.
Diffstat (limited to 'libc')
-rw-r--r--libc/stdlib/random.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/libc/stdlib/random.c b/libc/stdlib/random.c
index b009c4310..05ce3fe84 100644
--- a/libc/stdlib/random.c
+++ b/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
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 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
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])]
};