diff --git a/src/nvim/cmdexpand.c b/src/nvim/cmdexpand.c index 893deadd13..c2469b6574 100644 --- a/src/nvim/cmdexpand.c +++ b/src/nvim/cmdexpand.c @@ -3078,7 +3078,7 @@ static int ExpandUserDefined(const char *const pat, expand_T *xp, regmatch_T *re *matches = NULL; *numMatches = 0; - char *const retstr = call_user_expand_func((user_expand_func_T)call_func_retstr, xp); + char *const retstr = call_user_expand_func(call_func_retstr, xp); if (retstr == NULL) { return FAIL; } @@ -3150,7 +3150,7 @@ static int ExpandUserList(expand_T *xp, char ***matches, int *numMatches) { *matches = NULL; *numMatches = 0; - list_T *const retlist = call_user_expand_func((user_expand_func_T)call_func_retlist, xp); + list_T *const retlist = call_user_expand_func(call_func_retlist, xp); if (retlist == NULL) { return FAIL; } diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 014335f5ed..62ad6c057d 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -1226,7 +1226,7 @@ fail: /// /// @return [allocated] NULL when calling function fails, allocated string /// otherwise. -char *call_func_retstr(const char *const func, int argc, typval_T *argv) +void *call_func_retstr(const char *const func, int argc, typval_T *argv) FUNC_ATTR_NONNULL_ALL FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_MALLOC { typval_T rettv; diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c index eb1ce5457e..e866ed46a4 100644 --- a/src/nvim/ex_cmds.c +++ b/src/nvim/ex_cmds.c @@ -131,7 +131,7 @@ static const char e_non_numeric_argument_to_z[] = N_("E144: Non-numeric argument to :z"); /// ":ascii" and "ga" implementation -void do_ascii(const exarg_T *const eap) +void do_ascii(exarg_T *eap) { char *dig; int cc[MAX_MCO]; diff --git a/src/nvim/message.c b/src/nvim/message.c index 68ea49d53b..25324e36ae 100644 --- a/src/nvim/message.c +++ b/src/nvim/message.c @@ -1025,10 +1025,9 @@ int delete_first_msg(void) } /// :messages command implementation -void ex_messages(void *const eap_p) +void ex_messages(exarg_T *eap) FUNC_ATTR_NONNULL_ALL { - const exarg_T *const eap = (const exarg_T *)eap_p; struct msg_hist *p; if (strcmp(eap->arg, "clear") == 0) { diff --git a/src/nvim/message.h b/src/nvim/message.h index 78cd5b7d0e..6fc6674cc2 100644 --- a/src/nvim/message.h +++ b/src/nvim/message.h @@ -7,6 +7,7 @@ #include "klib/kvec.h" #include "nvim/api/private/defs.h" +#include "nvim/ex_cmds_defs.h" #include "nvim/grid_defs.h" #include "nvim/macros.h" #include "nvim/types.h" diff --git a/src/nvim/os/fileio.c b/src/nvim/os/fileio.c index 846219f720..119a42f074 100644 --- a/src/nvim/os/fileio.c +++ b/src/nvim/os/fileio.c @@ -282,9 +282,10 @@ static char writebuf[kRWBufferSize]; /// /// @param[in,out] rv RBuffer instance used. /// @param[in,out] fp File to work with. -static void file_rb_write_full_cb(RBuffer *const rv, FileDescriptor *const fp) +static void file_rb_write_full_cb(RBuffer *const rv, void *const fp_in) FUNC_ATTR_NONNULL_ALL { + FileDescriptor *const fp = fp_in; assert(fp->wr); assert(rv->data == (void *)fp); if (rbuffer_size(rv) == 0) {