Revision: 10295 Author: [email protected] Date: Wed Dec 21 13:28:41 2011 Log: 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 <[email protected]>. http://code.google.com/p/v8/source/detail?r=10295 Modified: /branches/bleeding_edge/src/string-search.h ======================================= --- /branches/bleeding_edge/src/string-search.h Tue Nov 29 02:56:11 2011 +++ /branches/bleeding_edge/src/string-search.h Wed Dec 21 13:28:41 2011 @@ -369,6 +369,10 @@ 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; -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
