mirror of
https://github.com/neovim/neovim.git
synced 2026-08-29 10:31:48 +00:00
Add another const to tv_copy
Clang static analyzer had trouble with filter_map in eval.c because tv_copy could, in principle, change the v_type of argvars[0]. It saw a potential null pointer going somewhere it shouldn't as a result. The from argument in tv_copy should be const, which also cleans up the static analyzer's complaint.
This commit is contained in:
@@ -2153,7 +2153,7 @@ void tv_free(typval_T *tv)
|
||||
///
|
||||
/// @param[in] from Location to copy from.
|
||||
/// @param[out] to Location to copy to.
|
||||
void tv_copy(typval_T *const from, typval_T *const to)
|
||||
void tv_copy(const typval_T *const from, typval_T *const to)
|
||||
{
|
||||
to->v_type = from->v_type;
|
||||
to->v_lock = VAR_UNLOCKED;
|
||||
|
||||
Reference in New Issue
Block a user