After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 779838 - arg: Fix accidental fallthrough
arg: Fix accidental fallthrough
Status: RESOLVED FIXED
Product: gjs
Classification: Bindings
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Florian Müllner
gjs-maint
Depends on:
Blocks:
 
 
Reported: 2017-03-10 09:31 UTC by Florian Müllner
Modified: 2017-03-11 07:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
arg: Fix accidental fallthrough (656 bytes, patch)
2017-03-10 09:31 UTC, Florian Müllner
committed Details | Review
arg: Shut up a compiler warning (1015 bytes, patch)
2017-03-10 15:07 UTC, Florian Müllner
committed Details | Review

Description Florian Müllner 2017-03-10 09:31:11 UTC
Drive-by fix, see patch.
Comment 1 Florian Müllner 2017-03-10 09:31:17 UTC
Created attachment 347607 [details] [review]
arg: Fix accidental fallthrough
Comment 2 Florian Müllner 2017-03-10 15:07:29 UTC
Created attachment 347648 [details] [review]
arg: Shut up a compiler warning

Recent GCC warns about implicit fallthrough in switch statements.
C++-17 defines a standard [[fallthrough]] attribute to mark an
intentional fallthrough, but to not make too many assumptions
about the compiler, just move the existing comment where GCC
recognizes it.
Comment 3 Philip Chimento 2017-03-11 07:22:02 UTC
Review of attachment 347648 [details] [review]:

Thank you for making me google C++ attributes! I learned something :-)

But indeed, I would not like to depend on a more recent C++ standard than is mandated by the version of SpiderMonkey.

Patch +1
Comment 4 Philip Chimento 2017-03-11 07:22:14 UTC
Review of attachment 347607 [details] [review]:

+1 Nice catch, this went unspotted for 7 years.
Comment 5 Philip Chimento 2017-03-11 07:24:13 UTC
Attachment 347607 [details] pushed as c7fc8af - arg: Fix accidental fallthrough
Attachment 347648 [details] pushed as 8eeaa62 - arg: Shut up a compiler warning