]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libgomp: Simplify 'parse_stacksize' call in 'libgomp/env.c:initialize_env'
authorThomas Schwinge <tschwinge@baylibre.com>
Fri, 24 Oct 2025 07:59:53 +0000 (09:59 +0200)
committerThomas Schwinge <tschwinge@baylibre.com>
Tue, 28 Oct 2025 08:54:29 +0000 (09:54 +0100)
Minor fix-up for commit r13-2545-g9f2fca56593a2b87026b399d26adcdca90705685
"OpenMP, libgomp: Environment variable syntax extension".  Supplying an array
of three elements is misleading: 'parse_stacksize' only looks at 'params[0]'.
Just let the compiler figure out the array size (..., as done elsewhere, too).

libgomp/
* env.c (initialize_env): Simplify 'parse_stacksize' call.

libgomp/env.c

index 626a753ca71b265dac8db00973f033a2bcca5f15..f63a36afdd2342057c8d4efa51b72ab3061bf3a8 100644 (file)
@@ -2455,7 +2455,7 @@ initialize_env (void)
       const char *env = getenv ("GOMP_STACKSIZE");
       if (env != NULL
          && parse_stacksize ("GOMP_STACKSIZE", env,
-                             (void *[3]) {&none->icvs.stacksize}))
+                             (void *[]) {&none->icvs.stacksize}))
        gomp_set_icv_flag (&none->flags, GOMP_ICV_STACKSIZE);
     }
   if (none != NULL && gomp_get_icv_flag (none->flags, GOMP_ICV_STACKSIZE))