mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
coverity/13696: Unchecked return value: RI.
Problem : Unchecked return value (CHECKED_RETURN) @ 2644. Diagnostic : Real issue. Rationale : Other `u_save` invocations are checked, and there's no reason to think this invocation could not fail. Resolution : Check and return if failed (other previous checks in the same function just return, without reporting error, so we just do the same).
This commit is contained in:
parent
9b1c939370
commit
a97f9e9594
@ -30,6 +30,7 @@
|
|||||||
#include "nvim/fold.h"
|
#include "nvim/fold.h"
|
||||||
#include "nvim/getchar.h"
|
#include "nvim/getchar.h"
|
||||||
#include "nvim/indent.h"
|
#include "nvim/indent.h"
|
||||||
|
#include "nvim/log.h"
|
||||||
#include "nvim/mark.h"
|
#include "nvim/mark.h"
|
||||||
#include "nvim/mbyte.h"
|
#include "nvim/mbyte.h"
|
||||||
#include "nvim/memline.h"
|
#include "nvim/memline.h"
|
||||||
@ -2641,7 +2642,10 @@ do_put (
|
|||||||
|
|
||||||
/* Autocommands may be executed when saving lines for undo, which may make
|
/* Autocommands may be executed when saving lines for undo, which may make
|
||||||
* y_array invalid. Start undo now to avoid that. */
|
* y_array invalid. Start undo now to avoid that. */
|
||||||
u_save(curwin->w_cursor.lnum, curwin->w_cursor.lnum + 1);
|
if (u_save(curwin->w_cursor.lnum, curwin->w_cursor.lnum + 1) == FAIL) {
|
||||||
|
ELOG(_("Failed to save undo information"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (insert_string != NULL) {
|
if (insert_string != NULL) {
|
||||||
y_type = MCHAR;
|
y_type = MCHAR;
|
||||||
|
Loading…
Reference in New Issue
Block a user