diff options
Diffstat (limited to 'src/nvim/eval/typval.c')
-rw-r--r-- | src/nvim/eval/typval.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/nvim/eval/typval.c b/src/nvim/eval/typval.c index 99382d2a24..4bc3a85efb 100644 --- a/src/nvim/eval/typval.c +++ b/src/nvim/eval/typval.c @@ -374,7 +374,7 @@ void tv_list_append_dict(list_T *const list, dict_T *const dict) /// case string is considered to be usual zero-terminated /// string or NULL “empty” string. void tv_list_append_string(list_T *const l, const char *const str, - const ptrdiff_t len) + const ssize_t len) FUNC_ATTR_NONNULL_ARG(1) { if (str == NULL) { @@ -824,7 +824,7 @@ void tv_dict_watcher_add(dict_T *const dict, const char *const key_pattern, /// @param[in] cb2 Second callback to check. /// /// @return True if they are equal, false otherwise. -bool tv_callback_equal(const Callback *const cb1, const Callback *const cb2) +bool tv_callback_equal(const Callback *cb1, const Callback *cb2) FUNC_ATTR_NONNULL_ALL FUNC_ATTR_WARN_UNUSED_RESULT { if (cb1->type != cb2->type) { @@ -843,12 +843,12 @@ bool tv_callback_equal(const Callback *const cb1, const Callback *const cb2) return true; } } - assert(false); + abort(); return false; } /// Unref/free callback -void callback_free(Callback *const callback) +void callback_free(Callback *callback) FUNC_ATTR_NONNULL_ALL { switch (callback->type) { @@ -864,9 +864,6 @@ void callback_free(Callback *const callback) case kCallbackNone: { break; } - default: { - abort(); - } } callback->type = kCallbackNone; } |