~emersion/public-inbox

1

chayang: fails to build with Clang

Details
Message ID
<7cxj-eg97-wny@FreeBSD.org>
DKIM signature
pass
Download raw message
Affects systems where Clang is default e.g., FreeBSD, OpenBSD,
OpenMandriva, Chimera Linux.

$ git describe --tags --always
03f80d8

$ export CC=clang CXX=clang++
$ meson setup _build
$ meson compile -C _build
[...]
../main.c:267:4: error: expected expression
                        char *end = NULL;
                        ^
../main.c:269:32: error: use of undeclared identifier 'end'
                        delay_sec = strtod(optarg, &end);
                                                    ^
../main.c:270:22: error: use of undeclared identifier 'end'
                        if (errno != 0 || end == optarg || end != &optarg[strlen(optarg)]) {
                                          ^
../main.c:270:39: error: use of undeclared identifier 'end'
                        if (errno != 0 || end == optarg || end != &optarg[strlen(optarg)]) {
                                                           ^
4 errors generated.
Details
Message ID
<5ZYHYPiv1X3h7C2JrR15EchEzD0A1qUn_hvTyZ7UPMcGAj-1LrHGAeAx6ynQUq9EC3k1ZcCbvD2VBPsxQopOZ-y4DUK2--6nRWb2VSQMKP0=@emersion.fr>
In-Reply-To
<7cxj-eg97-wny@FreeBSD.org> (view parent)
DKIM signature
pass
Download raw message
Would you be willing to send a patch? e.g. by adding a semicolon after
the case's colon, before the variable declaration.

(Yes, that's an annoying C quirk. Thankfully C23 fixes this.)
Reply to thread Export thread (mbox)