aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ops.c
diff options
context:
space:
mode:
authorZyX <kp-pav@yandex.ru>2015-08-16 20:09:51 +0300
committerZyX <kp-pav@yandex.ru>2015-10-08 22:00:47 +0300
commit2ba138b2f9c060c98af952e6956e48ad1521b0c9 (patch)
tree4d9b17f2626d72677f742d6f436823eb50373e4d /src/nvim/ops.c
parent22906265a2647aadcbc3ab9ab8a590bffd95002c (diff)
downloadrneovim-2ba138b2f9c060c98af952e6956e48ad1521b0c9.tar.gz
rneovim-2ba138b2f9c060c98af952e6956e48ad1521b0c9.tar.bz2
rneovim-2ba138b2f9c060c98af952e6956e48ad1521b0c9.zip
*: Fix problems with clang+asan Release build
Diffstat (limited to 'src/nvim/ops.c')
-rw-r--r--src/nvim/ops.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/ops.c b/src/nvim/ops.c
index f7219aba31..d59630697d 100644
--- a/src/nvim/ops.c
+++ b/src/nvim/ops.c
@@ -5312,7 +5312,7 @@ void end_global_changes(void)
/// Check whether register is empty
static inline bool reg_empty(const yankreg_T *const reg)
- FUNC_ATTR_CONST
+ FUNC_ATTR_PURE
{
return (reg->y_array == NULL
|| reg->y_size == 0
@@ -5331,8 +5331,9 @@ static inline bool reg_empty(const yankreg_T *const reg)
/// NULL if iteration is over.
const void *op_register_iter(const void *const iter, char *const name,
yankreg_T *const reg)
- FUNC_ATTR_PURE FUNC_ATTR_NONNULL_ARG(2, 3) FUNC_ATTR_WARN_UNUSED_RESULT
+ FUNC_ATTR_NONNULL_ARG(2, 3) FUNC_ATTR_WARN_UNUSED_RESULT
{
+ *name = NUL;
const yankreg_T *iter_reg = (iter == NULL
? &(y_regs[0])
: (const yankreg_T *const) iter);
@@ -5340,7 +5341,6 @@ const void *op_register_iter(const void *const iter, char *const name,
iter_reg++;
}
if (iter_reg - &(y_regs[0]) == NUM_SAVED_REGISTERS || reg_empty(iter_reg)) {
- *reg = (yankreg_T) { .y_array = NULL };
return NULL;
}
size_t iter_off = iter_reg - &(y_regs[0]);
@@ -5356,7 +5356,7 @@ const void *op_register_iter(const void *const iter, char *const name,
/// Get a number of non-empty registers
size_t op_register_amount(void)
- FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT
+ FUNC_ATTR_WARN_UNUSED_RESULT
{
size_t ret = 0;
for (size_t i = 0; i < NUM_SAVED_REGISTERS; i++) {