Closed Bug 1438108 Opened 2 years ago Closed 2 years ago
[Static Analysis][Logically dead code] in Restyle
Manager::Change Hint To String
Coverity thinks that rest = 0: uint32_t rest = aHint & ~static_cast<uint32_t>((1ull << ArrayLength(names)) - 1); Causing code to be dead code: https://searchfox.org/mozilla-central/source/layout/base/RestyleManager.cpp#472-475
Hiroyuki, do you agree with this?
Oh right, indeed. I didn't notice it. But it will be used when we need to expand change hints to uint64_t, so I don't think it's not a big deal.
[ Triage 2017/02/20: P3 ]
Priority: -- → P3
need to remove this code only https://searchfox.org/mozilla-central/source/layout/base/RestyleManager.cpp#472-475 or anything else to do?
Manish, the code from the original report has moved (since the link was to current tip rather than whatever commit Coverity was run on), and should be this: https://searchfox.org/mozilla-central/rev/5a744713370ec47969595e369fd5125f123e6d24/layout/base/RestyleManager.cpp#630-633 But as Hiro mentions, this is not a problem, given it was meant to handle how ever many change hint bits we currently use. It doesn't seem worth trying to avoid the warning by changing the code. Sylvestre, can we whitelist this warning?
Done, sorry Manish!
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.