Change fixes this kind of compilation warnings with clang-17:
proto/if_python3.pro:13:20: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
13 | int python3_version();
| ^
| void
https://github.com/vim/vim/pull/13166
(4 files)
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Interesting how do you compile vim?
I have made a PR to get clang-17 on the CI but it runs fine on latest patch.:
#12745
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Merging #13166 (a410778) into master (ceee7a8) will increase coverage by
0.60%.
The diff coverage is100.00%.
@@ Coverage Diff @@ ## master #13166 +/- ## ========================================== + Coverage 82.13% 82.73% +0.60% ========================================== Files 160 150 -10 Lines 195308 182098 -13210 Branches 43823 40921 -2902 ========================================== - Hits 160412 150665 -9747 + Misses 22058 18487 -3571 - Partials 12838 12946 +108
| Flag | Coverage Δ | |
|---|---|---|
| huge-clang-Array | 82.73% <100.00%> (-0.01%) |
⬇️ |
| linux | 82.73% <100.00%> (-0.01%) |
⬇️ |
| mingw-x64-HUGE | ? |
|
| mingw-x86-HUGE | ? |
|
| windows | ? |
Flags with carried forward coverage won't be shown. Click here to find out more.
| Files Changed | Coverage Δ | |
|---|---|---|
| src/os_unix.c | 66.97% <ø> (-0.05%) |
⬇️ |
| src/debugger.c | 90.76% <100.00%> (+1.59%) |
⬆️ |
| src/if_python3.c | 80.86% <100.00%> (+6.41%) |
⬆️ |
... and 140 files with indirect coverage changes
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@pheiduck asked:
Interesting how do you compile vim?
I have made a PR to get clang-17 on the CI but it runs fine on latest patch.:
#12745
To reproduce the warning with clang-17, I had uncommented out this line to enable -Wall -Wmissing-prototypes:
$ git diff
diff --git a/src/Makefile b/src/Makefile
index 4d0a5ebad..a5c0d9dea 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -602,7 +602,7 @@ CClink = $(CC)
#CFLAGS = -g -O2 -fno-strength-reduce -Wall -Wmissing-prototypes
#CFLAGS = -g -Wall -Wmissing-prototypes
#CFLAGS = -O6 -fno-strength-reduce -Wall -Wshadow -Wmissing-prototypes
-#CFLAGS = -g -DDEBUG -Wall -Wshadow -Wmissing-prototypes
+CFLAGS = -g -DDEBUG -Wall -Wshadow -Wmissing-prototypes
#CFLAGS = -g -O2 '-DSTARTUPTIME="vimstartup"' -fno-strength-reduce -Wall -Wmissing-prototypes
# Use this with GCC to check for mistakes, unused arguments, etc.
I now see that the warning is not specific to clang-17 actually, it also happens with clang-14, clang-15, gcc-9, gcc-11 for example, so I'll reword the commit message.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
I think if certain warnings are important, such as -Wmissing-prototypes and -Wstrict-prototypes, we should turn them on in ci/config.mk.sed or ci/config.mk.gcc.sed or ci/config.mk.clang.sed. This way it will actually checked in CI.
Otherwise it's just whack-a-mole every time. We should either decide if such warnings are important (in which case we check them in CI), or unimportant (in which case we don't bother fixing them).
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Hmm, I tried adding this to CI and seems like GTK and Ruby headers don't really like them, so it would be a little annoying to just add them in unless we also add warning suppression when including those headers…
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()