Summary: | Fix warnings on ARM and MIPS | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Dominik Inführ <dominik.infuehr> | ||||
Component: | New Bugs | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | commit-queue, guijemont, keith_miller, mark.lam, saam, webkit-bug-importer | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | WebKit Nightly Build | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Dominik Inführ
2019-02-26 07:49:15 PST
Created attachment 362986 [details]
Patch
Comment on attachment 362986 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=362986&action=review r=me with fix. > Source/JavaScriptCore/tools/JSDollarVM.cpp:1464 > + candidateCodeBlock = static_cast<CodeBlock*>(value.asCell()); Let's use bitwise_cast here too. Comment on attachment 362986 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=362986&action=review >> Source/JavaScriptCore/tools/JSDollarVM.cpp:1464 >> + candidateCodeBlock = static_cast<CodeBlock*>(value.asCell()); > > Let's use bitwise_cast here too. Why? My preference of casting is: 1. static_cast 2. bitwise_cast 3. reinterpret_cast Comment on attachment 362986 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=362986&action=review >>> Source/JavaScriptCore/tools/JSDollarVM.cpp:1464 >>> + candidateCodeBlock = static_cast<CodeBlock*>(value.asCell()); >> >> Let's use bitwise_cast here too. > > Why? > My preference of casting is: > 1. static_cast > 2. bitwise_cast > 3. reinterpret_cast I just wasn't thinking correctly. I guess static_cast does a compile time type check, and hence, is preferable to bitwise_cast which only does a size check. I withdraw my comment. Comment on attachment 362986 [details] Patch Clearing flags on attachment: 362986 Committed r242109: <https://trac.webkit.org/changeset/242109> All reviewed patches have been landed. Closing bug. *** Bug 188598 has been marked as a duplicate of this bug. *** |