Closed
Bug 1363907
Opened 8 years ago
Closed 7 years ago
store_bytes.h:60:27 [-Wunused-value] expression result unused
Categories
(Core :: Graphics: Text, defect)
Core
Graphics: Text
Tracking
()
RESOLVED
FIXED
People
(Reporter: dholbert, Unassigned)
References
Details
Just noticed this build warning in my buildspew:
> store_bytes.h:60:27 [-Wunused-value] expression result unused
tl;dr: this is from a line of cruft that was mistakenly left behind in bug 1322660.
Details
=======
The warning points to the final line of the following enigmatic chunk of code:
> uint16_t v = ((val & 0xFF) << 8) | ((val & 0xFF00) >> 8);
> memcpy(dst + *offset, &v, 2);
> ((val & 0xFF) << 8) | ((val & 0xFF00) >> 8);
https://dxr.mozilla.org/mozilla-central/rev/ebbcdaa5b5802ecd39624dd2acbdda8547b8384d/modules/woff2/src/store_bytes.h#60
Indeed, that final line is simply some arithmetic which is unused!
Before bug 1322660, it looked like this:
> *reinterpret_cast<uint16_t*>(dst + *offset) =
> ((val & 0xFF) << 8) | ((val & 0xFF00) >> 8);
Bug 1322660 replaced this assignment with a memcpy operation, but left the "((val & 0xFF)" etc. expression standing alone, doing nothing:
https://hg.mozilla.org/mozilla-central/diff/1c8f82fbc5cf/modules/woff2/src/store_bytes.h#l1.39
fredw: if I'm understanding correctly, could you take this & remove that line?
| Reporter | ||
Updated•8 years ago
|
Component: Layout → Graphics: Text
Flags: needinfo?(fred.wang)
Comment 1•8 years ago
|
||
(In reply to Daniel Holbert [:dholbert] (AFK May 3-8, 13-21) from comment #0)
> Bug 1322660 replaced this assignment with a memcpy operation, but left the
> "((val & 0xFF)" etc. expression standing alone, doing nothing:
> https://hg.mozilla.org/mozilla-central/diff/1c8f82fbc5cf/modules/woff2/src/
> store_bytes.h#l1.39
Right, that's how I see it too.
>
> fredw: if I'm understanding correctly, could you take this & remove that
> line?
Sure, will try it when I have time.
Flags: needinfo?(fred.wang)
Comment 2•7 years ago
|
||
Per policy at https://wiki.mozilla.org/Bug_Triage/Projects/Bug_Handling/Bug_Husbandry#Inactive_Bugs. If this bug is not an enhancement request or a bug not present in a supported release of Firefox, then it may be reopened.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INACTIVE
| Reporter | ||
Comment 3•7 years ago
|
||
This was fixed in https://hg.mozilla.org/mozilla-central/rev/0dc9284b03d4#l11.53 (bug 1384862)
Depends on: 1384862
Resolution: INACTIVE → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•