From 6d057a2ca53f295f2db9a89b924f904128e4ce34 Mon Sep 17 00:00:00 2001 From: Eliseo Martínez Date: Mon, 10 Nov 2014 00:15:24 +0100 Subject: Fix warnings: fileio.c: aucmd_prepbuf(): Np dereference: FP. Problem : Dereference of null pointer @ 6219. Diagnostic : False positive. Rationale : Problem occurs if `aucmd_win` is NULL after `win_alloc_aucmd_win()`, which cannot happen since it uses new memory functions. So, this is a leftover since OOM refactorization. Resolution : Remove dead code. --- src/nvim/fileio.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/nvim/fileio.c') diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c index 16431d14c3..05a0a59874 100644 --- a/src/nvim/fileio.c +++ b/src/nvim/fileio.c @@ -6191,12 +6191,9 @@ aucmd_prepbuf ( } } - /* Allocate "aucmd_win" when needed. If this fails (out of memory) fall - * back to using the current window. */ + /* Allocate "aucmd_win" when needed. */ if (win == NULL && aucmd_win == NULL) { win_alloc_aucmd_win(); - if (aucmd_win == NULL) - win = curwin; } if (win == NULL && aucmd_win_used) /* Strange recursive autocommand, fall back to using the current -- cgit