From 43a88bf7f0ad0cf2b6d898e2907cc3189eb8258f Mon Sep 17 00:00:00 2001 From: Denis Ovsienko Date: Sat, 24 Jul 2021 11:43:25 +0100 Subject: [PATCH] Fixup the previous commit for GCC. [skip ci] Apparently, it does not like pragmas in the middle of a statement: ./missing/getopt_long.c: In function 'getopt_internal': ./missing/getopt_long.c:572:3: error: 'else' without a previous 'if' (cherry picked from commit 34fd411f222dd93868ae677dbe8ae82d09f9f199) --- missing/getopt_long.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/missing/getopt_long.c b/missing/getopt_long.c index 5018400e..927028ff 100644 --- a/missing/getopt_long.c +++ b/missing/getopt_long.c @@ -565,11 +565,11 @@ start: ++optind; } else { /* takes (optional) argument */ optarg = NULL; + if (*place) { /* no white space */ DIAG_OFF_CAST_QUAL - if (*place) /* no white space */ optarg = (char *)place; DIAG_ON_CAST_QUAL - else if (oli[1] != ':') { /* arg not optional */ + } else if (oli[1] != ':') { /* arg not optional */ if (++optind >= nargc) { /* no arg */ place = EMSG; if (PRINT_ERROR) -- 2.39.5