[webkit-reviews] review denied: [Bug 80926] Fix some compiler warnings (miscellaneous) : [Attachment 131678] Fix signed/unsigned mismatches

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 13 14:41:16 PDT 2012


Filip Pizlo <fpizlo at apple.com> has denied George Staikos <staikos at kde.org>'s
request for review:
Bug 80926: Fix some compiler warnings (miscellaneous)
https://bugs.webkit.org/show_bug.cgi?id=80926

Attachment 131678: Fix signed/unsigned mismatches
https://bugs.webkit.org/attachment.cgi?id=131678&action=review

------- Additional Comments from Filip Pizlo <fpizlo at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=131678&action=review


I agree with you that it is really enjoyable to have philosophical discussions
about which of the various styles of casting to use.  There are many of them
and their differences are fabulous.

However, what's important for us is that we stick to one style.  We use the
foo_cast<bar>(baz) style, and we generally stay away from bar(baz) or (bar)baz.
 That's just our convention.

> Source/JavaScriptCore/assembler/AssemblerBufferWithConstantPool.h:218
> +	   if (isForced || 5 * unsigned(m_numConsts) > 3 * maxPoolSize /
sizeof(uint32_t))

This should be static_cast<m_numConsts>

> Source/JavaScriptCore/assembler/MacroAssemblerARM.h:463
> +	       ARMWord tmp = (right.m_value == int(0x80000000)) ?
ARMAssembler::INVALID_IMM : m_assembler.getOp2(-right.m_value);

This should be static_cast<int>(0x80000000).

> Source/JavaScriptCore/parser/Lexer.cpp:632
> +    ASSERT(unsigned(c) <= USHRT_MAX);

This should be static_cast<unsigned>(c)


More information about the webkit-reviews mailing list