diff options
author | Paul Rigge <rigge@berkeley.edu> | 2017-12-30 22:17:31 -0800 |
---|---|---|
committer | Paul Rigge <rigge@berkeley.edu> | 2018-01-02 17:22:33 -0800 |
commit | dea7a41138674b45e8cfd5c1d713d4048987c830 (patch) | |
tree | dae54f2601e0bf41a0d01f531f7334a60393bea9 | |
parent | d63c3d9d105b7d81ad397e784b33d3dec7073338 (diff) | |
download | rneovim-dea7a41138674b45e8cfd5c1d713d4048987c830.tar.gz rneovim-dea7a41138674b45e8cfd5c1d713d4048987c830.tar.bz2 rneovim-dea7a41138674b45e8cfd5c1d713d4048987c830.zip |
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.
-rw-r--r-- | src/nvim/eval/typval.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/eval/typval.c b/src/nvim/eval/typval.c index 21bb84a945..ac6c8c8aa6 100644 --- a/src/nvim/eval/typval.c +++ b/src/nvim/eval/typval.c @@ -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; |