1
0
Fork 0

Remove unused variables

Detected through codeql

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3837>
This commit is contained in:
Bilal Elmoussaoui 2024-06-22 14:39:21 +02:00 committed by Bilal Elmoussaoui
parent 42e5c7bd9c
commit 6e1c761330
18 changed files with 1 additions and 30 deletions

View file

@ -55,7 +55,6 @@ ensure_bits_initialized (CoglGlFramebufferBack *gl_framebuffer_back)
cogl_framebuffer_driver_get_framebuffer (driver);
CoglContext *ctx = cogl_framebuffer_get_context (framebuffer);
CoglFramebufferBits *bits = &gl_framebuffer_back->bits;
g_autoptr (GError) error = NULL;
if (!gl_framebuffer_back->dirty_bitmasks)
return TRUE;

View file

@ -65,7 +65,6 @@ ensure_bits_initialized (CoglGlFramebufferFbo *gl_framebuffer_fbo)
cogl_framebuffer_driver_get_framebuffer (driver);
CoglContext *ctx = cogl_framebuffer_get_context (framebuffer);
CoglFramebufferBits *bits = &gl_framebuffer_fbo->bits;
g_autoptr (GError) error = NULL;
if (!gl_framebuffer_fbo->dirty_bitmasks)
return TRUE;

View file

@ -2077,7 +2077,6 @@ choose_onscreen_egl_config (CoglOnscreen *onscreen,
MetaCrtcKms *crtc_kms = META_CRTC_KMS (onscreen_native->crtc);
MetaKmsPlane *kms_plane = meta_crtc_kms_get_assigned_primary_plane (crtc_kms);
EGLint attrs[MAX_EGL_CONFIG_ATTRIBS];
g_autoptr (GError) local_error = NULL;
static const uint32_t alphaless_10bpc_formats[] = {
GBM_FORMAT_XRGB2101010,
GBM_FORMAT_XBGR2101010,

View file

@ -2150,7 +2150,6 @@ meta_renderer_native_unset_modes (MetaRendererNative *renderer_native)
MetaGpu *gpu = l->data;
MetaKmsDevice *kms_device;
GList *k;
g_autoptr (MetaKmsFeedback) kms_feedback = NULL;
MetaKmsUpdate *kms_update = NULL;
if (!META_IS_GPU_KMS (gpu))

View file

@ -765,7 +765,6 @@ meta_thread_reset_thread_type (MetaThread *thread,
MetaThreadType thread_type)
{
MetaThreadPrivate *priv = meta_thread_get_instance_private (thread);
g_autoptr (GMainContext) thread_context = NULL;
if (priv->thread_type == thread_type)
return;

View file

@ -6647,7 +6647,6 @@ meta_window_get_unit_cgroup (MetaWindow *window)
g_autofree char *contents = NULL;
g_autofree char *complete_path = NULL;
g_autofree char *unit_name = NULL;
g_autofree char *unit_path = NULL;
char *unit_end;
pid_t pid;

View file

@ -35,7 +35,6 @@ get_colord_mock_proxy (void)
{
GDBusProxy *proxy;
g_autoptr (GError) error = NULL;
g_autoptr (GVariant) ret = NULL;
proxy =
g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM,

View file

@ -127,7 +127,6 @@ get_colord_mock_proxy (void)
{
GDBusProxy *proxy;
g_autoptr (GError) error = NULL;
g_autoptr (GVariant) ret = NULL;
proxy =
g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM,
@ -260,7 +259,6 @@ get_gsd_color_mock_proxy (void)
{
GDBusProxy *proxy;
g_autoptr (GError) error = NULL;
g_autoptr (GVariant) ret = NULL;
proxy =
g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION,

View file

@ -318,7 +318,6 @@ meta_test_input_capture_clear_barriers (void)
MetaBackend *backend = meta_context_get_backend (test_context);
ClutterSeat *seat = meta_backend_get_default_seat (backend);
g_autoptr (MetaVirtualMonitor) virtual_monitor1 = NULL;
g_autoptr (MetaVirtualMonitor) virtual_monitor2 = NULL;
g_autoptr (ClutterVirtualInputDevice) virtual_pointer = NULL;
InputCaptureTestClient *test_client;
@ -436,7 +435,6 @@ meta_test_input_capture_events (void)
MetaBackend *backend = meta_context_get_backend (test_context);
ClutterSeat *seat = meta_backend_get_default_seat (backend);
g_autoptr (MetaVirtualMonitor) virtual_monitor1 = NULL;
g_autoptr (MetaVirtualMonitor) virtual_monitor2 = NULL;
g_autoptr (ClutterVirtualInputDevice) virtual_pointer = NULL;
g_autoptr (ClutterVirtualInputDevice) virtual_keyboard = NULL;
InputCaptureTestClient *test_client;
@ -595,7 +593,6 @@ main (int argc,
char **argv)
{
g_autoptr (MetaContext) context = NULL;
g_autoptr (GError) error = NULL;
context = test_context =
meta_create_test_context (META_CONTEXT_TEST_TYPE_HEADLESS,

View file

@ -91,7 +91,6 @@ meta_backend_test_add_test_device (MetaBackendTest *backend_test,
ClutterInputDeviceType device_type,
int n_buttons)
{
g_autoptr (GList) devices = NULL;
MetaBackend *backend = META_BACKEND (backend_test);
ClutterBackend *clutter_backend = meta_backend_get_clutter_backend (backend);
ClutterSeat *seat = clutter_backend_get_default_seat (clutter_backend);

View file

@ -1147,7 +1147,6 @@ assert_realtime (MetaThreadImpl *thread_impl,
GError **error)
{
g_autoptr (GVariant) ret = NULL;
g_autoptr (GVariant) priority_variant = NULL;
uint32_t priority = 0;
g_assert_true (meta_thread_impl_is_realtime (thread_impl));
@ -1196,7 +1195,6 @@ assert_no_realtime (MetaThreadImpl *thread_impl,
GError **error)
{
g_autoptr (GVariant) ret = NULL;
g_autoptr (GVariant) priority_variant = NULL;
uint32_t priority = UINT32_MAX;
g_assert_false (meta_thread_impl_is_realtime (thread_impl));

View file

@ -93,7 +93,6 @@ main (int argc,
char **argv)
{
g_autoptr (MetaContext) context = NULL;
g_autoptr (GError) error = NULL;
context = meta_create_test_context (META_CONTEXT_TEST_TYPE_HEADLESS,
META_CONTEXT_TEST_FLAG_NO_X11);

View file

@ -168,7 +168,6 @@ main (int argc,
char **argv)
{
g_autoptr (MetaContext) context = NULL;
g_autoptr (GError) error = NULL;
context = meta_create_test_context (META_CONTEXT_TEST_TYPE_HEADLESS,
META_CONTEXT_TEST_FLAG_NO_X11);

View file

@ -275,7 +275,6 @@ main (int argc,
char **argv)
{
g_autoptr (MetaContext) context = NULL;
g_autoptr (GError) error = NULL;
context = meta_create_test_context (META_CONTEXT_TEST_TYPE_HEADLESS,
META_CONTEXT_TEST_FLAG_TEST_CLIENT);

View file

@ -320,7 +320,6 @@ main (int argc,
char **argv)
{
g_autoptr (MetaContext) context = NULL;
g_autoptr (GError) error = NULL;
context = test_context =
meta_create_test_context (META_CONTEXT_TEST_TYPE_HEADLESS,

View file

@ -175,7 +175,6 @@ primary_device_set_selection (struct wl_client *client,
uint32_t serial)
{
MetaWaylandDataDevicePrimary *data_device = wl_resource_get_user_data (resource);
MetaWaylandSeat *seat = wl_container_of (data_device, seat, primary_data_device);
MetaWaylandDataSource *source = NULL;
if (source_resource)
@ -343,7 +342,6 @@ void
meta_wayland_data_device_primary_set_focus (MetaWaylandDataDevicePrimary *data_device,
MetaWaylandSurface *surface)
{
MetaWaylandSeat *seat = wl_container_of (data_device, seat, primary_data_device);
struct wl_client *focus_client = NULL;
struct wl_resource *data_device_resource;

View file

@ -1042,7 +1042,6 @@ data_device_set_selection (struct wl_client *client,
uint32_t serial)
{
MetaWaylandDataDevice *data_device = wl_resource_get_user_data (resource);
MetaWaylandSeat *seat = wl_container_of (data_device, seat, data_device);
MetaWaylandDataSource *source;
if (source_resource)
@ -1244,7 +1243,6 @@ void
meta_wayland_data_device_set_focus (MetaWaylandDataDevice *data_device,
MetaWaylandSurface *surface)
{
MetaWaylandSeat *seat = wl_container_of (data_device, seat, data_device);
struct wl_client *focus_client = NULL;
struct wl_resource *data_device_resource;

View file

@ -335,13 +335,7 @@ meta_wayland_input_detach_event_handler (MetaWaylandInput *input,
wl_list_remove (&handler->link);
if (handler_change && !wl_list_empty (&input->event_handler_list))
{
MetaWaylandEventHandler *head =
wl_container_of (input->event_handler_list.next,
head, link);
meta_wayland_input_invalidate_all_focus (input);
}
meta_wayland_input_invalidate_all_focus (input);
if (input->grab && !should_be_grabbed (input))
{