mirror of
https://github.com/neovim/neovim.git
synced 2025-10-10 03:46:31 +00:00
Remove nonnullret deadcode: Mark new nonnullret functions.
This commit is contained in:
@@ -390,19 +390,13 @@ char_u *transstr(char_u *s) FUNC_ATTR_NONNULL_RET
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Convert the string "str[orglen]" to do ignore-case comparing. Uses the
|
/// Convert the string "str[orglen]" to do ignore-case comparing.
|
||||||
/// current locale.
|
/// Use the current locale.
|
||||||
///
|
///
|
||||||
/// When "buf" is NULL returns an allocated string (NULL for out-of-memory).
|
/// When "buf" is NULL, return an allocated string.
|
||||||
/// Otherwise puts the result in "buf[buflen]".
|
/// Otherwise, put the result in buf, limited by buflen, and return buf.
|
||||||
///
|
|
||||||
/// @param str
|
|
||||||
/// @param orglen
|
|
||||||
/// @param buf
|
|
||||||
/// @param buflen
|
|
||||||
///
|
|
||||||
/// @return converted string.
|
|
||||||
char_u* str_foldcase(char_u *str, int orglen, char_u *buf, int buflen)
|
char_u* str_foldcase(char_u *str, int orglen, char_u *buf, int buflen)
|
||||||
|
FUNC_ATTR_NONNULL_RET
|
||||||
{
|
{
|
||||||
garray_T ga;
|
garray_T ga;
|
||||||
int i;
|
int i;
|
||||||
|
@@ -3265,6 +3265,7 @@ addstar (
|
|||||||
int len,
|
int len,
|
||||||
int context /* EXPAND_FILES etc. */
|
int context /* EXPAND_FILES etc. */
|
||||||
)
|
)
|
||||||
|
FUNC_ATTR_NONNULL_RET
|
||||||
{
|
{
|
||||||
char_u *retval;
|
char_u *retval;
|
||||||
int i, j;
|
int i, j;
|
||||||
@@ -3343,7 +3344,6 @@ addstar (
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
retval = xmalloc(len + 4);
|
retval = xmalloc(len + 4);
|
||||||
if (retval != NULL) {
|
|
||||||
STRLCPY(retval, fname, len + 1);
|
STRLCPY(retval, fname, len + 1);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -3372,7 +3372,6 @@ addstar (
|
|||||||
--len;
|
--len;
|
||||||
retval[len] = NUL;
|
retval[len] = NUL;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -28,6 +28,7 @@
|
|||||||
#include "nvim/ex_docmd.h"
|
#include "nvim/ex_docmd.h"
|
||||||
#include "nvim/ex_eval.h"
|
#include "nvim/ex_eval.h"
|
||||||
#include "nvim/fold.h"
|
#include "nvim/fold.h"
|
||||||
|
#include "nvim/func_attr.h"
|
||||||
#include "nvim/getchar.h"
|
#include "nvim/getchar.h"
|
||||||
#include "nvim/hashtab.h"
|
#include "nvim/hashtab.h"
|
||||||
#include "nvim/iconv.h"
|
#include "nvim/iconv.h"
|
||||||
@@ -2106,6 +2107,7 @@ void set_forced_fenc(exarg_T *eap)
|
|||||||
* When *pp is not set to NULL, the result is in allocated memory.
|
* When *pp is not set to NULL, the result is in allocated memory.
|
||||||
*/
|
*/
|
||||||
static char_u *next_fenc(char_u **pp)
|
static char_u *next_fenc(char_u **pp)
|
||||||
|
FUNC_ATTR_NONNULL_ALL FUNC_ATTR_NONNULL_RET
|
||||||
{
|
{
|
||||||
char_u *p;
|
char_u *p;
|
||||||
char_u *r;
|
char_u *r;
|
||||||
|
Reference in New Issue
Block a user