Fix GCC 4.7 warnings.

* src/string-search.h (StringSearch): Avoid -Werror=strict-overflow
  warning.

Review URL: http://codereview.chromium.org/8947022
Patch from Tobias Burnus <burnus@net-b.de>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10295 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
vegorov@chromium.org 2011-12-21 21:28:41 +00:00
parent d61278da6d
commit e624162c45

View File

@ -369,6 +369,10 @@ void StringSearch<PatternChar, SubjectChar>::PopulateBoyerMooreTable() {
shift_table[pattern_length] = 1;
suffix_table[pattern_length] = pattern_length + 1;
if (pattern_length <= start) {
return;
}
// Find suffixes.
PatternChar last_char = pattern[pattern_length - 1];
int suffix = pattern_length + 1;