[metacity] frame-style: suppress logically dead code defects
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [metacity] frame-style: suppress logically dead code defects
- Date: Sun, 14 Mar 2021 18:59:54 +0000 (UTC)
commit c8af796a472cec8692f3b3def0a7339fa329a17a
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Sun Mar 14 20:58:41 2021 +0200
frame-style: suppress logically dead code defects
Both enumeration values are handled outside of switch.
Coverity CID: #1445653
libmetacity/meta-frame-style.c | 9 +++++++++
1 file changed, 9 insertions(+)
---
diff --git a/libmetacity/meta-frame-style.c b/libmetacity/meta-frame-style.c
index ced565be3..12a67a0b8 100644
--- a/libmetacity/meta-frame-style.c
+++ b/libmetacity/meta-frame-style.c
@@ -535,8 +535,17 @@ meta_frame_style_set_get_style (MetaFrameStyleSet *style_set,
case META_FRAME_STATE_TILED_RIGHT_AND_SHADED:
styles = style_set->tiled_right_and_shaded_styles;
break;
+
+ /* coverity[dead_error_line] */
case META_FRAME_STATE_NORMAL:
+ g_assert_not_reached ();
+ break;
+
+ /* coverity[dead_error_line] */
case META_FRAME_STATE_SHADED:
+ g_assert_not_reached ();
+ break;
+
case META_FRAME_STATE_LAST:
default:
g_assert_not_reached ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]