js/src/ion/Snapshots.cpp:141:7: warning: variable 'u' set but not used [-Wunused-but-set-variable]

RESOLVED FIXED

Status

()

defect
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: dholbert, Assigned: dholbert)

Tracking

(Blocks 1 bug)

Trunk
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

New build warning in debug builds:
{
js/src/ion/Snapshots.cpp:141:7: warning: variable 'u' set but not used [-Wunused-but-set-variable]
}

Bug 841054 removed the only usage of this variable.  Looks like this whole chunk might just want to go away.
Posted patch fix (obsolete) — Splinter Review
This fixes the warning by removing this apparently no-longer-needed chunk.
Assignee: general → dholbert
Status: NEW → ASSIGNED
Attachment #715787 - Flags: review?(nicolas.b.pierron)
review ping (still seeing this warning in my builds)
Flags: needinfo?(nicolas.b.pierron)
Comment on attachment 715787 [details] [diff] [review]
fix

Review of attachment 715787 [details] [diff] [review]:
-----------------------------------------------------------------

::: js/src/ion/Snapshots.cpp
@@ -139,5 @@
> -        RawScript script;
> -        uint8_t bytes[sizeof(RawScript)];
> -    } u;
> -    for (size_t i = 0; i < sizeof(RawScript); i++)
> -        u.bytes[i] = reader_.readByte();

You should also remove it from the startFrame function, otherwise no bailout will work anymore and Ion will surely fail the test suite.
Attachment #715787 - Flags: review?(nicolas.b.pierron)
Flags: needinfo?(nicolas.b.pierron)
Posted patch fix v2Splinter Review
Ah, thanks for noticing that. Here's a new patch with that chunk removed as well.
Attachment #715787 - Attachment is obsolete: true
Attachment #720000 - Flags: review?(nicolas.b.pierron)
I verified that this updated patch passes Try, too, BTW:
https://tbpl.mozilla.org/?tree=Try&rev=2c641f4d8984
Comment on attachment 720000 [details] [diff] [review]
fix v2

Review of attachment 720000 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks.
Attachment #720000 - Flags: review?(nicolas.b.pierron) → review+
Inbound's been closed for most of today, so I just landed on central (which has reopened):
 https://hg.mozilla.org/mozilla-central/rev/88c693a603a8
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.