Skip to content

Commit bc3fd0c

Browse files
committed
-Werror,-Wgnu-folding-constant
> desktop/unx/source/start.c:788:23: error: variable length array folded to constant array as an extension [-Werror,-Wgnu-folding-constant] > 788 | char resp[strlen("InternalIPC::SendArguments") + 1]; > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ since <llvm/llvm-project@e4163c0> "[clang] Emit bad shift warnings (#70307)" (and see the comments starting at <llvm/llvm-project#70307 (comment)> "[clang] Emit bad shift warnings" for how this new warning is indeed intentional) Change-Id: Ie439a0f5f6f3b256fa82ec3a05fdc5fb3b840715 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170510 Reviewed-by: Stephan Bergmann <[email protected]> Tested-by: Jenkins
1 parent a14f0b1 commit bc3fd0c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

desktop/unx/source/start.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -785,7 +785,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
785785
if ((fd=connect_pipe(pPipePath)) >= 0)
786786
{
787787
// Wait for answer
788-
char resp[strlen("InternalIPC::SendArguments") + 1];
788+
char resp[27]; // strlen("InternalIPC::SendArguments") + 1
789789
ssize_t n = read(fd, resp, SAL_N_ELEMENTS(resp));
790790
if (n == (ssize_t) SAL_N_ELEMENTS(resp) &&
791791
(memcmp(resp, "InternalIPC::SendArguments",

0 commit comments

Comments
 (0)