aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-02-09 09:25:18 +0800
committerGitHub <noreply@github.com>2022-02-09 09:25:18 +0800
commite16ec0be22384a2ff7faef26cf9c06136c947a04 (patch)
tree5cf652b1c72dca085018852eec135dcca3582a33
parent19b2ad0518920a733dd7370808aa65ee62334986 (diff)
parent4ce5d27f46599c844eb7ad52b126bb43b97f1c9e (diff)
downloadrneovim-e16ec0be22384a2ff7faef26cf9c06136c947a04.tar.gz
rneovim-e16ec0be22384a2ff7faef26cf9c06136c947a04.tar.bz2
rneovim-e16ec0be22384a2ff7faef26cf9c06136c947a04.zip
Merge pull request #17341 from zeertzjq/clang-suppress
chore(clang): suppress "result of operation is garbage"
-rw-r--r--src/nvim/search.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/nvim/search.c b/src/nvim/search.c
index 3a2435e07a..682fa417a9 100644
--- a/src/nvim/search.c
+++ b/src/nvim/search.c
@@ -4848,6 +4848,7 @@ static int fuzzy_match_compute_score(const char_u *const str, const int strSz,
const uint32_t *const matches, const int numMatches)
FUNC_ATTR_NONNULL_ALL FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_PURE
{
+ assert(numMatches > 0); // suppress clang "result of operation is garbage"
// Initialize score
int score = 100;