mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 23:50:41 -05:00
Fix builds with G_DISABLE_ASSERT
Commit 25f416c13d
added additional compilation warnings, including
-Werror=return-type. There are several places where this results
in build failures if `g_assert_not_reached()` is disabled at compile
time and the compiler misses a return value.
https://gitlab.gnome.org/GNOME/mutter/issues/447
This commit is contained in:
parent
de41f3ea28
commit
d5a7bbd094
@ -994,6 +994,7 @@ get_connector_type_name (MetaConnectorType connector_type)
|
||||
case META_CONNECTOR_TYPE_DSI: return "DSI";
|
||||
default: g_assert_not_reached ();
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static GList *
|
||||
|
@ -37,4 +37,5 @@ meta_monitor_transform_invert (MetaMonitorTransform transform)
|
||||
return transform;
|
||||
}
|
||||
g_assert_not_reached ();
|
||||
return 0;
|
||||
}
|
||||
|
@ -479,6 +479,7 @@ discrete_steps_to_scroll_direction (unsigned int axis,
|
||||
return CLUTTER_SCROLL_RIGHT;
|
||||
|
||||
g_assert_not_reached ();
|
||||
return 0;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
@ -924,6 +924,7 @@ is_cursor_hw_state_valid (MetaCursorSprite *cursor_sprite,
|
||||
}
|
||||
|
||||
g_assert_not_reached ();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
#ifdef HAVE_WAYLAND
|
||||
|
@ -173,6 +173,7 @@ meta_monitor_transform_to_xrandr (MetaMonitorTransform transform)
|
||||
}
|
||||
|
||||
g_assert_not_reached ();
|
||||
return 0;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
@ -70,6 +70,7 @@ get_x11_cogl_winsys_vtable (CoglRenderer *renderer)
|
||||
break;
|
||||
}
|
||||
g_assert_not_reached ();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static CoglRenderer *
|
||||
|
@ -635,6 +635,7 @@ texture_has_alpha (CoglTexture *texture)
|
||||
return FALSE;
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -348,6 +348,7 @@ meta_surface_actor_is_argb32 (MetaSurfaceActor *self)
|
||||
return FALSE;
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1246,6 +1246,7 @@ meta_rectangle_edge_aligns (const MetaRectangle *rect, const MetaEdge *edge)
|
||||
BOX_LEFT (edge->rect) <= BOX_RIGHT (*rect);
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1603,6 +1603,7 @@ get_event_route_from_grab_op (MetaGrabOp op)
|
||||
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2622,6 +2623,7 @@ meta_display_supports_extended_barriers (MetaDisplay *display)
|
||||
}
|
||||
|
||||
g_assert_not_reached ();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -308,6 +308,7 @@ movement_towards_edge (MetaSide side, int increment)
|
||||
return increment > 0;
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -86,6 +86,7 @@ get_window_for_event (MetaDisplay *display,
|
||||
return display->grab_window;
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -992,6 +992,7 @@ meta_get_locale_direction (void)
|
||||
return META_LOCALE_DIRECTION_RTL;
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5498,6 +5498,7 @@ meta_window_get_workspaces (MetaWindow *window)
|
||||
return NULL;
|
||||
else
|
||||
g_assert_not_reached ();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -955,6 +955,7 @@ grab_op_from_resize_control (MetaFrameControl control)
|
||||
return META_GRAB_OP_RESIZING_W;
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
return META_GRAB_OP_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1003,6 +1004,7 @@ get_button_number (const ClutterEvent *event)
|
||||
return clutter_event_get_button (event);
|
||||
|
||||
g_assert_not_reached ();
|
||||
return -1;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@ -1105,6 +1107,7 @@ meta_frame_left_click_event (MetaUIFrame *frame,
|
||||
return FALSE;
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -373,6 +373,7 @@ meta_wayland_buffer_attach (MetaWaylandBuffer *buffer,
|
||||
}
|
||||
|
||||
g_assert_not_reached ();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
CoglTexture *
|
||||
|
@ -94,6 +94,7 @@ cogl_subpixel_order_to_wl_output_subpixel (CoglSubpixelOrder subpixel_order)
|
||||
}
|
||||
|
||||
g_assert_not_reached ();
|
||||
return WL_OUTPUT_SUBPIXEL_UNKNOWN;
|
||||
}
|
||||
|
||||
static enum wl_output_subpixel
|
||||
|
@ -1832,6 +1832,7 @@ positioner_anchor_to_placement_anchor (uint32_t anchor)
|
||||
return (META_PLACEMENT_ANCHOR_BOTTOM | META_PLACEMENT_ANCHOR_RIGHT);
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
return META_PLACEMENT_ANCHOR_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1860,6 +1861,7 @@ positioner_gravity_to_placement_gravity (uint32_t gravity)
|
||||
return (META_PLACEMENT_GRAVITY_BOTTOM | META_PLACEMENT_GRAVITY_RIGHT);
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
return META_PLACEMENT_GRAVITY_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -302,6 +302,7 @@ standard_pict_format_for_depth (int depth)
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static XRenderPictFormat *
|
||||
|
@ -931,6 +931,7 @@ is_edge_constraint_resizable (MetaEdgeConstraint constraint)
|
||||
}
|
||||
|
||||
g_assert_not_reached ();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@ -946,6 +947,7 @@ is_edge_constraint_tiled (MetaEdgeConstraint constraint)
|
||||
}
|
||||
|
||||
g_assert_not_reached ();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static unsigned long
|
||||
|
Loading…
Reference in New Issue
Block a user