mirror of
https://github.com/neovim/neovim.git
synced 2024-12-19 10:45:16 -07:00
fix: fix ASAN errors on clang 17 (#25469)
This commit is contained in:
parent
eb1f0e8fcc
commit
fd791db0ec
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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];
|
||||
|
@ -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) {
|
||||
|
@ -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"
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user