From 48ce1eb364ef29839167b97667e14d61ab4f7f2c Mon Sep 17 00:00:00 2001 From: Darshan Sen Date: Sat, 30 Jan 2021 20:07:48 +0530 Subject: [PATCH] src: fix warning in string_search.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: https://github.com/nodejs/node/issues/37145 PR-URL: https://github.com/nodejs/node/pull/37146 Reviewed-By: Anna Henningsen Reviewed-By: Rich Trott Reviewed-By: James M Snell Reviewed-By: Juan José Arboleda Reviewed-By: Tobias Nießen --- src/string_search.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/string_search.h b/src/string_search.h index 3d06f32058f673..3648bc015ab229 100644 --- a/src/string_search.h +++ b/src/string_search.h @@ -458,7 +458,7 @@ size_t StringSearch::BoyerMooreHorspoolSearch( const size_t subject_length = subject.length(); const size_t pattern_length = pattern_.length(); int* char_occurrences = bad_char_shift_table_; - int64_t badness = -pattern_length; + int64_t badness = -static_cast(pattern_length); // How bad we are doing without a good-suffix table. Char last_char = pattern_[pattern_length - 1];