[vim/vim] Add -Wstrict-prototypes -Wmissing-prototypes warnings check to CI (PR #13223)

10 views
Skip to first unread message

Yee Cheng Chin

unread,
Sep 29, 2023, 9:50:43 PM9/29/23
to vim/vim, Subscribed

Add two new warnings to CI:

  • strict-prototypes helps prevent declaring a function with an empty argument list, e.g. int func(). In C++, that's equivalent to int func(void), but in C, that means a function that can take any number of arguments which is rarely what we want.

  • missing-prototypes makes sure we use static for file-only internal functions. Non-static functions should have been declared on a prototype file.

Also, fix up misc code warnings that this found.

GTK header needs to have #pragma warning suppressiong because GTK2 headers will warn on -Wstrict-prototypes, and it's included by gui.h and so we can't just turn off the warning in a couple files.


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/13223

Commit Summary

  • 7442f1d Add -Wstrict-prototypes -Wmissing-prototypes warnings check to CI

File Changes

(8 files)

Patch Links:


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/13223@github.com>

Yee Cheng Chin

unread,
Sep 29, 2023, 9:51:10 PM9/29/23
to vim/vim, Subscribed

I mentioned in #13166, but I think we should just add these warnings to be checked in CI.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/13223/c1741625297@github.com>

Christian Brabandt

unread,
Sep 30, 2023, 6:26:51 AM9/30/23
to vim/vim, Subscribed

thanks, let me squash in #13226 as well into this


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/13223/c1741735084@github.com>

Christian Brabandt

unread,
Sep 30, 2023, 6:36:57 AM9/30/23
to vim/vim, Subscribed

Closed #13223 via f7f746b.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/13223/issue_event/10517118741@github.com>

Reply all
Reply to author
Forward
0 new messages