-
-
Notifications
You must be signed in to change notification settings - Fork 5.9k
fix: clang compilation warnings with -Wstrict-prototypes #13166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Interesting how do you compile vim? |
Codecov Report
@@ Coverage Diff @@
## master #13166 +/- ##
==========================================
- Coverage 82.13% 82.12% -0.01%
==========================================
Files 160 160
Lines 195308 195308
Branches 43823 43823
==========================================
- Hits 160412 160395 -17
- Misses 22058 22075 +17
Partials 12838 12838
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
@pheiduck asked:
To reproduce the warning with clang-17, I had uncommented out this line to enable 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. |
Change fixes this kind of compilation warnings with clang:
```
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
```
a410778 to
664fde4
Compare
|
I think if certain warnings are important, such as 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). |
|
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… |
Change fixes this kind of compilation warnings with clang-17: