Closed
Bug 1438108
Opened 6 years ago
Closed 6 years ago
[Static Analysis][Logically dead code] in RestyleManager::ChangeHintToString
Categories
(Core :: Layout, enhancement, P3)
Core
Layout
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: Sylvestre, Assigned: manishkk)
References
(Blocks 1 open bug)
Details
(Keywords: coverity, Whiteboard: [CID 1429500])
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
Comment 2•6 years ago
|
||
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.
Flags: needinfo?(hikezoe)
Assignee | ||
Comment 4•6 years ago
|
||
need to remove this code only https://searchfox.org/mozilla-central/source/layout/base/RestyleManager.cpp#472-475 or anything else to do?
Flags: needinfo?(sledru)
Assignee | ||
Updated•6 years ago
|
Assignee: nobody → 1991manish.kumar
Comment 5•6 years ago
|
||
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?
Reporter | ||
Comment 6•6 years ago
|
||
Done, sorry Manish!
Status: NEW → RESOLVED
Closed: 6 years ago
Flags: needinfo?(sledru)
Resolution: --- → WONTFIX
Reporter | ||
Updated•6 years ago
|
status-firefox60:
affected → ---
You need to log in
before you can comment on or make changes to this bug.
Description
•