aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/buffer.c
diff options
context:
space:
mode:
authorPavel Platto <hinidu@gmail.com>2014-07-13 10:03:07 +0300
committerNicolas Hillegeer <nicolas@hillegeer.com>2014-07-14 20:28:40 +0200
commit47084ea7657121837536d409b9137fd38426aeef (patch)
tree1bf014cf8e25a6875bc49328deafbfc9f5e0ef88 /src/nvim/buffer.c
parent2dc69700ec9a01b3b7cd4823e8cd3ad5431b9410 (diff)
downloadrneovim-47084ea7657121837536d409b9137fd38426aeef.tar.gz
rneovim-47084ea7657121837536d409b9137fd38426aeef.tar.bz2
rneovim-47084ea7657121837536d409b9137fd38426aeef.zip
Use strict function prototypes #945
`-Wstrict-prototypes` warn if a function is declared or defined without specifying the argument types. This warning disallow function prototypes with empty parameter list. In C, a function declared with an empty parameter list accepts an arbitrary number of arguments when being called. This is for historic reasons; originally, C functions didn't have prototypes, as C evolved from B, a typeless language. When prototypes were added, the original typeless declarations were left in the language for backwards compatibility. Instead we should provide `void` in argument list to state that function doesn't have arguments. Also this warning disallow declaring type of the parameters after the parentheses because Neovim header generator produce no declarations for old-stlyle prototypes: it expects to find `{` after prototype.
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r--src/nvim/buffer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c
index a34d2d03da..4f7b8407b4 100644
--- a/src/nvim/buffer.c
+++ b/src/nvim/buffer.c
@@ -4484,7 +4484,7 @@ void buf_delete_signs(buf_T *buf)
/*
* Delete all signs in all buffers.
*/
-void buf_delete_all_signs()
+void buf_delete_all_signs(void)
{
buf_T *buf; /* buffer we are checking for signs */