aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_getln.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/ex_getln.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/ex_getln.c')
-rw-r--r--src/nvim/ex_getln.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c
index ad0bcdc150..e8e2f61679 100644
--- a/src/nvim/ex_getln.c
+++ b/src/nvim/ex_getln.c
@@ -3932,11 +3932,8 @@ expand_shellcmd (
* Call "user_expand_func()" to invoke a user defined VimL function and return
* the result (either a string or a List).
*/
-static void * call_user_expand_func(user_expand_func, xp, num_file, file)
-user_expand_func_T user_expand_func;
-expand_T *xp;
-int *num_file;
-char_u ***file;
+static void * call_user_expand_func(user_expand_func_T user_expand_func,
+ expand_T *xp, int *num_file, char_u ***file)
{
int keep = 0;
char_u num[50];