Fix gcc error for static_cast the parameters of DCHECK_GT macro to unsigned in list.h.
The CL #42279 (https://codereview.chromium.org/2619353006 ) caused a gcc error (-Werror=strict-overflow). Here is the error message: In file included from .././src/globals.h:15:0, from .././src/allocation.h:9, from .././src/profiler/profile-generator.h:9, from ../src/profiler/profile-generator.cc:5: .././src/base/logging.h: In member function ‘void v8::internal::ProfileTree::TraverseDepthFirst(Callback*) [with Callback = v8::internal::DeleteNodesCallback]’: .././src/base/logging.h:179:70: error: assuming signed overflow does not occur when assuming that (X - c) > X is always false [-Werror=strict-overflow] : MakeCheckOpString<Lhs, Rhs>(lhs, rhs, msg); \ ^ .././src/base/logging.h:191:1: note: in expansion of macro ‘DEFINE_CHECK_OP_IMPL’ DEFINE_CHECK_OP_IMPL(GT, > ) ^ CXX(target) /home/zxli/work/google-v8/v8/out/x87.optdebug/obj.target/v8_base/src/regexp/regexp-macro-assembler.o cc1plus: all warnings being treated as errors This CL fix it. BUG= Review-Url: https://codereview.chromium.org/2632633002 Cr-Commit-Position: refs/heads/master@{#42318}
Showing
Please
register
or
sign in
to comment