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 788787 - gtktextview: Add a missing g_assert_not_reached() for switch default
gtktextview: Add a missing g_assert_not_reached() for switch default
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkTextView
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2017-10-10 17:31 UTC by Philip Withnall
Modified: 2017-10-11 16:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gtktextview: Add a missing g_assert_not_reached() for switch default (1.15 KB, patch)
2017-10-10 17:31 UTC, Philip Withnall
committed Details | Review

Description Philip Withnall 2017-10-10 17:31:47 UTC
Trivial patch attached.
Comment 1 Philip Withnall 2017-10-10 17:31:52 UTC
Created attachment 361258 [details] [review]
gtktextview: Add a missing g_assert_not_reached() for switch default

Clarifies the code and helps catch invalid enum values before they
propagate further. Also add a comment about why two seemingly legitimate
values are not handled there (they’re handled higher up in the file).

Coverity CID: 1457700

Signed-off-by: Philip Withnall <withnall@endlessm.com>
Comment 2 Matthias Clasen 2017-10-11 16:02:53 UTC
Review of attachment 361258 [details] [review]:

ok, thanks for adding a clarifying comment
Comment 3 Philip Withnall 2017-10-11 16:27:32 UTC
Attachment 361258 [details] pushed as 7e8831d - gtktextview: Add a missing g_assert_not_reached() for switch default