diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-04-14 21:48:32 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-14 21:48:32 +0800 |
commit | f6a3fdd6848d67dc54cebb6c297f8ebdc109c3a3 (patch) | |
tree | 33e8bf1e2e87b6a3975800f8157ff4978eb0ccee /src/nvim/window.c | |
parent | c34c31af734577255b6fb8a84b5f1ce9ff03cd6a (diff) | |
download | rneovim-f6a3fdd6848d67dc54cebb6c297f8ebdc109c3a3.tar.gz rneovim-f6a3fdd6848d67dc54cebb6c297f8ebdc109c3a3.tar.bz2 rneovim-f6a3fdd6848d67dc54cebb6c297f8ebdc109c3a3.zip |
refactor: fix clang NonNullParamChecker warnings (#28327)
Diffstat (limited to 'src/nvim/window.c')
-rw-r--r-- | src/nvim/window.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nvim/window.c b/src/nvim/window.c index 7389b1fe2f..9f030d2bab 100644 --- a/src/nvim/window.c +++ b/src/nvim/window.c @@ -1959,6 +1959,7 @@ int win_splitmove(win_T *wp, int size, int flags) // Remove the window and frame from the tree of frames. Don't flatten any // frames yet so we can restore things if win_split_ins fails. winframe_remove(wp, &dir, NULL, &unflat_altfr); + assert(unflat_altfr != NULL); win_remove(wp, NULL); last_status(false); // may need to remove last status line win_comp_pos(); // recompute window positions @@ -1967,6 +1968,7 @@ int win_splitmove(win_T *wp, int size, int flags) // Split a window on the desired side and put "wp" there. if (win_split_ins(size, flags, wp, dir, unflat_altfr) == NULL) { if (!wp->w_floating) { + assert(unflat_altfr != NULL); // win_split_ins doesn't change sizes or layout if it fails to insert an // existing window, so just undo winframe_remove. winframe_restore(wp, dir, unflat_altfr); |