CI: disable -O2 for Coverity after v9.1.0429
Commit:
https://github.com/vim/vim/commit/95ff39f8e3d5e16d4ef55f47d8f50da29df05f9e
Author: Christian Brabandt <[email protected]>
Date: Wed May 22 07:53:23 2024 +0200
CI: disable -O2 for Coverity after v9.1.0429
gcc -O2 outputs this warning and turns it into an error when running
Coverity action:
```
eval.c: In function ‘echo_string_core’:
cc1: warning: function may return address of local variable
[-Wreturn-local-addr]
eval.c:6495:12: note: declared here
6495 | char_u buf[MAX_FUNC_NAME_LEN];
| ^~~
```
This seems to be a false positive, so disable -O2 for Coverity
specifically.
Signed-off-by: Christian Brabandt <[email protected]>
diff --git a/.github/workflows/coverity.yml b/.github/workflows/coverity.yml
index 290f7e4e4..90a6e9ff0 100644
--- a/.github/workflows/coverity.yml
+++ b/.github/workflows/coverity.yml
@@ -63,6 +63,9 @@ jobs:
# Append various warning flags to CFLAGS.
sed -i -f ci/config.mk.sed src/auto/config.mk
sed -i -f ci/config.mk.${CC}.sed src/auto/config.mk
+ # -O2 gives false warning and turns it into an error:
+ # warning: function may return address of local variable
[-Wreturn-local-addr]
+ sed -i 's/-O2 \?//' src/auto/config.mk
- name: Build/scan vim
if: env.TOKEN
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/E1s9f1D-00HFdd-P6%40256bit.org.