aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.c
diff options
context:
space:
mode:
authorhyatskov <vokstay@gmx.de>2018-08-05 02:37:00 +0200
committerJustin M. Keyes <justinkz@gmail.com>2018-08-05 02:37:00 +0200
commitb42c80e561c15fd49112dc46a7de04dd061a3483 (patch)
tree6aa3d272c0b03652ad01ee699a198653e59add15 /src/nvim/eval.c
parent5d8a47b6e07c907f9474246862c17620030317e4 (diff)
downloadrneovim-b42c80e561c15fd49112dc46a7de04dd061a3483.tar.gz
rneovim-b42c80e561c15fd49112dc46a7de04dd061a3483.tar.bz2
rneovim-b42c80e561c15fd49112dc46a7de04dd061a3483.zip
eval, ex_getln: Fix incompatible pointer types (#8792)
Fixes #8786 gcc (GCC) 8.1.1 20180531 warning: [76/182] Building C object src/nvim/CMakeFiles/nvim.dir/ex_getln.c.o ../src/nvim/ex_getln.c: In function ‘ExpandUserDefined’: ../src/nvim/ex_getln.c:5071:34: warning: cast between incompatible function types from ‘char * (*)(const char * const, const int, const char_u * const* const, const _Bool)’ {aka ‘char * (*)(const char * const, const int, const unsigned char * const* const, const _Bool)’} to ‘void * (*)(char_u *, int, char_u **, int)’ {aka ‘void * (*)(unsigned char *, int, unsigned char **, int)’} [-Wcast-function-type] retstr = call_user_expand_func((user_expand_func_T)call_func_retstr, xp,
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r--src/nvim/eval.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index 3843245070..15b5c3eef3 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -1186,7 +1186,7 @@ int call_vim_function(
const char_u *func,
int argc,
const char_u *const *const argv,
- int safe, // use the sandbox
+ bool safe, // use the sandbox
int str_arg_only, // all arguments are strings
typval_T *rettv
)
@@ -1276,9 +1276,9 @@ varnumber_T call_func_retnr(char_u *func, int argc,
///
/// @return [allocated] NULL when calling function fails, allocated string
/// otherwise.
-char *call_func_retstr(const char *const func, const int argc,
- const char_u *const *const argv,
- const bool safe)
+char *call_func_retstr(const char *const func, int argc,
+ const char_u *const *argv,
+ bool safe)
FUNC_ATTR_NONNULL_ARG(1) FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_MALLOC
{
typval_T rettv;
@@ -1302,8 +1302,8 @@ char *call_func_retstr(const char *const func, const int argc,
///
/// @return [allocated] NULL when calling function fails or return tv is not a
/// List, allocated List otherwise.
-void *call_func_retlist(char_u *func, int argc, const char_u *const *const argv,
- int safe)
+void *call_func_retlist(char_u *func, int argc, const char_u *const *argv,
+ bool safe)
{
typval_T rettv;