mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Fix warnings: message.c: msg_attr_keep(): Np dereference: FP.
Problem : Dereference of null pointer @ 179. Diagnostic : False positive. Rationale : Error occurs if `s` paramater is null, which should not happen. Resolution : Declare parameter as non null.
This commit is contained in:
parent
a71c5e9eb9
commit
734ac625bb
@ -145,7 +145,7 @@ int verb_msg(char_u *s)
|
||||
return n;
|
||||
}
|
||||
|
||||
int msg_attr(char_u *s, int attr)
|
||||
int msg_attr(char_u *s, int attr) FUNC_ATTR_NONNULL_ARG(1)
|
||||
{
|
||||
return msg_attr_keep(s, attr, FALSE);
|
||||
}
|
||||
@ -156,6 +156,7 @@ msg_attr_keep (
|
||||
int attr,
|
||||
int keep /* TRUE: set keep_msg if it doesn't scroll */
|
||||
)
|
||||
FUNC_ATTR_NONNULL_ARG(1)
|
||||
{
|
||||
static int entered = 0;
|
||||
int retval;
|
||||
@ -2623,7 +2624,7 @@ int verbose_open(void)
|
||||
* Give a warning message (for searching).
|
||||
* Use 'w' highlighting and may repeat the message after redrawing
|
||||
*/
|
||||
void give_warning(char_u *message, bool hl)
|
||||
void give_warning(char_u *message, bool hl) FUNC_ATTR_NONNULL_ARG(1)
|
||||
{
|
||||
/* Don't do this for ":silent". */
|
||||
if (msg_silent != 0)
|
||||
|
Loading…
Reference in New Issue
Block a user