diff options
author | Stephan Bergmann <stephan.bergmann@allotropia.de> | 2024-07-15 18:06:08 +0200 |
---|---|---|
committer | Stephan Bergmann <stephan.bergmann@allotropia.de> | 2024-07-15 23:10:07 +0200 |
commit | bc3fd0c8110256c920669e6e355b42504b17c7b2 (patch) | |
tree | 3d8de5ebacd2da5fa2238ab576091e53988fd5d3 | |
parent | a14f0b14c4a0904d37c5ad5b18400d832bde7804 (diff) |
-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
<https://github.com/llvm/llvm-project/commit/e4163c0927772f2ec73cf16d53e000614c419c45>
"[clang] Emit bad shift warnings (#70307)" (and see the comments starting at
<https://github.com/llvm/llvm-project/pull/70307#issuecomment-2228342153>
"[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 <stephan.bergmann@allotropia.de>
Tested-by: Jenkins
-rw-r--r-- | desktop/unx/source/start.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/desktop/unx/source/start.c b/desktop/unx/source/start.c index 0bb009d9c598..9094ca228a08 100644 --- a/desktop/unx/source/start.c +++ b/desktop/unx/source/start.c @@ -785,7 +785,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) if ((fd=connect_pipe(pPipePath)) >= 0) { // Wait for answer - char resp[strlen("InternalIPC::SendArguments") + 1]; + char resp[27]; // strlen("InternalIPC::SendArguments") + 1 ssize_t n = read(fd, resp, SAL_N_ELEMENTS(resp)); if (n == (ssize_t) SAL_N_ELEMENTS(resp) && (memcmp(resp, "InternalIPC::SendArguments", |