Closed Bug 1411545 Opened 7 years ago Closed 7 years ago

streamClosed: this statement may fall through

Categories

(Core :: JavaScript Engine: JIT, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla58
Tracking Status
firefox58 --- fixed

People

(Reporter: Sylvestre, Assigned: Sylvestre)

References

Details

Attachments

(1 file)

/root/firefox-gcc-last/js/src/wasm/WasmJS.cpp: In member function 'virtual void CompileStreamTask::streamClosed(JS::StreamConsumer::CloseReason)':
 /root/firefox-gcc-last/js/src/wasm/WasmJS.cpp:2315:13: error: this statement may fall through [-Werror=implicit-fallthrough=]
              }
              ^
Blocks: build-gcc-7
No longer blocks: build-gcc-8
Comment on attachment 8921840 [details]
Bug 1411545 - streamClosed: Fix the implicit-fallthrough warning

https://reviewboard.mozilla.org/r/192878/#review198148

::: js/src/wasm/WasmJS.cpp:2316
(Diff revision 1)
>                  setClosedAndDestroyAfterHelperThreadStarted();
>                  return;
>                case Closed:
>                  MOZ_CRASH("streamClosed() in Closed state");
>              }
> +            break;

Ah, didn't know about this warning.  Thanks for the patch!  For symmetry, could you add a 'break' below at the end of the Error case too?
Attachment #8921840 - Flags: review?(luke) → review+
Pushed by sledru@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d7bd525a3831
streamClosed: Fix the implicit-fallthrough warning r=luke
https://hg.mozilla.org/mozilla-central/rev/d7bd525a3831
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: