From 2c95e0899879c5e00edc2079fb50d2f1f5c0a5e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Fri, 2 Oct 2020 17:54:56 +0200 Subject: [PATCH] Remove misplaced line break in g_* logging functions They resulted in empty lines in the log. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1466 --- src/backends/meta-cursor-sprite-xcursor.c | 2 +- src/backends/meta-monitor-config-store.c | 4 ++-- src/backends/meta-profiler.c | 4 ++-- src/backends/meta-remote-desktop.c | 6 +++--- src/backends/meta-screen-cast.c | 6 +++--- src/backends/native/meta-backend-native.c | 2 +- src/backends/native/meta-virtual-input-device-native.c | 6 +++--- src/backends/x11/meta-input-settings-x11.c | 4 ++-- src/compositor/meta-surface-actor-x11.c | 2 +- src/core/boxes.c | 10 +++++----- src/core/constraints.c | 2 +- src/core/stack.c | 2 +- src/wayland/meta-xwayland-dnd.c | 2 +- src/wayland/meta-xwayland.c | 4 ++-- src/x11/group-props.c | 2 +- src/x11/meta-x11-selection.c | 2 +- 16 files changed, 30 insertions(+), 30 deletions(-) diff --git a/src/backends/meta-cursor-sprite-xcursor.c b/src/backends/meta-cursor-sprite-xcursor.c index 730d32351..c57a5a684 100644 --- a/src/backends/meta-cursor-sprite-xcursor.c +++ b/src/backends/meta-cursor-sprite-xcursor.c @@ -199,7 +199,7 @@ load_from_current_xcursor_image (MetaCursorSpriteXcursor *sprite_xcursor) &error); if (!texture) { - g_warning ("Failed to allocate cursor texture: %s\n", error->message); + g_warning ("Failed to allocate cursor texture: %s", error->message); g_error_free (error); } diff --git a/src/backends/meta-monitor-config-store.c b/src/backends/meta-monitor-config-store.c index 129b63285..8d116817d 100644 --- a/src/backends/meta-monitor-config-store.c +++ b/src/backends/meta-monitor-config-store.c @@ -1333,7 +1333,7 @@ saved_cb (GObject *object, { if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) { - g_warning ("Saving monitor configuration failed: %s\n", error->message); + g_warning ("Saving monitor configuration failed: %s", error->message); g_clear_object (&data->config_store->save_cancellable); } @@ -1372,7 +1372,7 @@ meta_monitor_config_store_save_sync (MetaMonitorConfigStore *config_store) NULL, &error)) { - g_warning ("Saving monitor configuration failed: %s\n", + g_warning ("Saving monitor configuration failed: %s", error->message); g_error_free (error); } diff --git a/src/backends/meta-profiler.c b/src/backends/meta-profiler.c index 43e49aa38..7a18b85ce 100644 --- a/src/backends/meta-profiler.c +++ b/src/backends/meta-profiler.c @@ -145,7 +145,7 @@ on_bus_acquired_cb (GObject *source, if (error) { if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) - g_warning ("Failed to get session bus: %s\n", error->message); + g_warning ("Failed to get session bus: %s", error->message); return; } @@ -157,7 +157,7 @@ on_bus_acquired_cb (GObject *source, META_SYSPROF_PROFILER_DBUS_PATH, &error)) { - g_warning ("Failed to export profiler object: %s\n", error->message); + g_warning ("Failed to export profiler object: %s", error->message); return; } diff --git a/src/backends/meta-remote-desktop.c b/src/backends/meta-remote-desktop.c index 95dd95e7e..1b73f4a91 100644 --- a/src/backends/meta-remote-desktop.c +++ b/src/backends/meta-remote-desktop.c @@ -207,7 +207,7 @@ on_bus_acquired (GDBusConnection *connection, connection, META_REMOTE_DESKTOP_DBUS_PATH, &error)) - g_warning ("Failed to export remote desktop object: %s\n", error->message); + g_warning ("Failed to export remote desktop object: %s", error->message); } static void @@ -215,7 +215,7 @@ on_name_acquired (GDBusConnection *connection, const char *name, gpointer user_data) { - g_info ("Acquired name %s\n", name); + g_info ("Acquired name %s", name); } static void @@ -223,7 +223,7 @@ on_name_lost (GDBusConnection *connection, const char *name, gpointer user_data) { - g_warning ("Lost or failed to acquire name %s\n", name); + g_warning ("Lost or failed to acquire name %s", name); } static void diff --git a/src/backends/meta-screen-cast.c b/src/backends/meta-screen-cast.c index 87e388163..13809d853 100644 --- a/src/backends/meta-screen-cast.c +++ b/src/backends/meta-screen-cast.c @@ -280,7 +280,7 @@ on_bus_acquired (GDBusConnection *connection, connection, META_SCREEN_CAST_DBUS_PATH, &error)) - g_warning ("Failed to export remote desktop object: %s\n", error->message); + g_warning ("Failed to export remote desktop object: %s", error->message); } static void @@ -288,7 +288,7 @@ on_name_acquired (GDBusConnection *connection, const char *name, gpointer user_data) { - g_info ("Acquired name %s\n", name); + g_info ("Acquired name %s", name); } static void @@ -296,7 +296,7 @@ on_name_lost (GDBusConnection *connection, const char *name, gpointer user_data) { - g_warning ("Lost or failed to acquire name %s\n", name); + g_warning ("Lost or failed to acquire name %s", name); } static void diff --git a/src/backends/native/meta-backend-native.c b/src/backends/native/meta-backend-native.c index 81babc248..afd3ff79a 100644 --- a/src/backends/native/meta-backend-native.c +++ b/src/backends/native/meta-backend-native.c @@ -816,7 +816,7 @@ meta_activate_session (void) if (!meta_launcher_activate_session (native->launcher, &error)) { - g_warning ("Could not activate session: %s\n", error->message); + g_warning ("Could not activate session: %s", error->message); g_error_free (error); return FALSE; } diff --git a/src/backends/native/meta-virtual-input-device-native.c b/src/backends/native/meta-virtual-input-device-native.c index ea0882ca1..510414bde 100644 --- a/src/backends/native/meta-virtual-input-device-native.c +++ b/src/backends/native/meta-virtual-input-device-native.c @@ -276,7 +276,7 @@ meta_virtual_input_device_native_notify_key (ClutterVirtualInputDevice *virtual_ if (get_button_type (key) != EVDEV_BUTTON_TYPE_KEY) { - g_warning ("Unknown/invalid virtual device key 0x%x pressed\n", key); + g_warning ("Unknown/invalid virtual device key 0x%x pressed", key); return; } @@ -373,7 +373,7 @@ apply_level_modifiers (ClutterVirtualInputDevice *virtual_device, } else { - g_warning ("Unhandled level: %d\n", level); + g_warning ("Unhandled level: %d", level); return; } @@ -425,7 +425,7 @@ meta_virtual_input_device_native_notify_keyval (ClutterVirtualInputDevice *virtu if (get_button_type (evcode) != EVDEV_BUTTON_TYPE_KEY) { - g_warning ("Unknown/invalid virtual device key 0x%x pressed\n", evcode); + g_warning ("Unknown/invalid virtual device key 0x%x pressed", evcode); return; } diff --git a/src/backends/x11/meta-input-settings-x11.c b/src/backends/x11/meta-input-settings-x11.c index 5c22dffee..d9870bab0 100644 --- a/src/backends/x11/meta-input-settings-x11.c +++ b/src/backends/x11/meta-input-settings-x11.c @@ -191,7 +191,7 @@ meta_input_settings_x11_set_send_events (MetaInputSettings *settings, } if ((values[0] && !available[0]) || (values[1] && !available[1])) - g_warning ("Device '%s' does not support sendevents mode %d\n", + g_warning ("Device '%s' does not support sendevents mode %d", clutter_input_device_get_device_name (device), mode); else change_property (device, "libinput Send Events Mode Enabled", @@ -419,7 +419,7 @@ meta_input_settings_x11_set_click_method (MetaInputSettings *settings, } if ((values[0] && !available[0]) || (values[1] && !available[1])) - g_warning ("Device '%s' does not support click method %d\n", + g_warning ("Device '%s' does not support click method %d", clutter_input_device_get_device_name (device), mode); else change_property (device, "libinput Click Method Enabled", diff --git a/src/compositor/meta-surface-actor-x11.c b/src/compositor/meta-surface-actor-x11.c index 3e1a5a723..41ae2dffb 100644 --- a/src/compositor/meta-surface-actor-x11.c +++ b/src/compositor/meta-surface-actor-x11.c @@ -132,7 +132,7 @@ set_pixmap (MetaSurfaceActorX11 *self, g_error_free (error); } else if (G_UNLIKELY (!cogl_texture_pixmap_x11_is_using_tfp_extension (COGL_TEXTURE_PIXMAP_X11 (texture)))) - g_warning ("NOTE: Not using GLX TFP!\n"); + g_warning ("NOTE: Not using GLX TFP!"); self->texture = texture; meta_shaped_texture_set_texture (stex, texture); diff --git a/src/core/boxes.c b/src/core/boxes.c index 37d04bb1a..ac8f2a9fe 100644 --- a/src/core/boxes.c +++ b/src/core/boxes.c @@ -435,7 +435,7 @@ merge_spanning_rects_in_region (GList *region) if (region == NULL) { g_warning ("Region to merge was empty! Either you have a some " - "pathological STRUT list or there's a bug somewhere!\n"); + "pathological STRUT list or there's a bug somewhere!"); return NULL; } @@ -955,7 +955,7 @@ meta_rectangle_clamp_to_fit_into_region (const GList *spanning_rects, /* Clamp rect appropriately */ if (best_rect == NULL) { - g_warning ("No rect whose size to clamp to found!\n"); + g_warning ("No rect whose size to clamp to found!"); /* If it doesn't fit, at least make it no bigger than it has to be */ if (!(fixed_directions & FIXED_DIRECTION_X)) @@ -1019,7 +1019,7 @@ meta_rectangle_clip_to_region (const GList *spanning_rects, /* Clip rect appropriately */ if (best_rect == NULL) { - g_warning ("No rect to clip to found!\n"); + g_warning ("No rect to clip to found!"); } else { @@ -1117,7 +1117,7 @@ meta_rectangle_shove_into_region (const GList *spanning_rects, /* Shove rect appropriately */ if (best_rect == NULL) { - g_warning ("No rect to shove into found!\n"); + g_warning ("No rect to shove into found!"); } else { @@ -1439,7 +1439,7 @@ meta_rectangle_edge_cmp_ignore_type (gconstpointer a, gconstpointer b) } } else - g_assert ("Some idiot wanted to sort sides of different types.\n"); + g_assert ("Some idiot wanted to sort sides of different types."); return a_compare - b_compare; /* positive value denotes a > b ... */ } diff --git a/src/core/constraints.c b/src/core/constraints.c index 9f4f9120d..b19ecd6cf 100644 --- a/src/core/constraints.c +++ b/src/core/constraints.c @@ -371,7 +371,7 @@ setup_constraint_info (ConstraintInfo *info, info->action_type = ACTION_MOVE; else g_error ("BAD, BAD developer! No treat for you! (Fix your calls to " - "meta_window_move_resize_internal()).\n"); + "meta_window_move_resize_internal())."); info->is_user_action = (flags & META_MOVE_RESIZE_USER_ACTION); diff --git a/src/core/stack.c b/src/core/stack.c index 116a7312b..44dce7098 100644 --- a/src/core/stack.c +++ b/src/core/stack.c @@ -97,7 +97,7 @@ on_stack_changed (MetaStack *stack) if (w->unmanaging) continue; - meta_topic (META_DEBUG_STACK, "%u:%d - %s ", + meta_topic (META_DEBUG_STACK, " %u:%d - %s ", w->layer, w->stack_position, w->desc); if (w->frame) diff --git a/src/wayland/meta-xwayland-dnd.c b/src/wayland/meta-xwayland-dnd.c index cd0f0d3ea..60f416821 100644 --- a/src/wayland/meta-xwayland-dnd.c +++ b/src/wayland/meta-xwayland-dnd.c @@ -362,7 +362,7 @@ transfer_cb (MetaSelection *selection, if (!meta_selection_transfer_finish (selection, res, &error)) { - g_warning ("Could not transfer DnD selection: %s\n", error->message); + g_warning ("Could not transfer DnD selection: %s", error->message); g_error_free (error); } diff --git a/src/wayland/meta-xwayland.c b/src/wayland/meta-xwayland.c index f2d193e95..88a04e5a2 100644 --- a/src/wayland/meta-xwayland.c +++ b/src/wayland/meta-xwayland.c @@ -255,7 +255,7 @@ bind_to_unix_socket (int display) unlink (addr.sun_path); if (bind (fd, (struct sockaddr *) &addr, size) < 0) { - g_warning ("failed to bind to %s: %m\n", addr.sun_path); + g_warning ("failed to bind to %s: %m", addr.sun_path); close (fd); return -1; } @@ -501,7 +501,7 @@ on_init_x11_cb (MetaDisplay *display, g_autoptr (GError) error = NULL; if (!meta_display_init_x11_finish (display, result, &error)) - g_warning ("Failed to initialize X11 display: %s\n", error->message); + g_warning ("Failed to initialize X11 display: %s", error->message); } static gboolean diff --git a/src/x11/group-props.c b/src/x11/group-props.c index 77ff1df73..24ee4992c 100644 --- a/src/x11/group-props.c +++ b/src/x11/group-props.c @@ -199,7 +199,7 @@ meta_x11_display_init_group_prop_hooks (MetaX11Display *x11_display) if (i != N_HOOKS) { - g_error ("Initialized %d group hooks should have been %d\n", i, N_HOOKS); + g_error ("Initialized %d group hooks should have been %d", i, N_HOOKS); } } diff --git a/src/x11/meta-x11-selection.c b/src/x11/meta-x11-selection.c index f9b3607a7..e389f22c7 100644 --- a/src/x11/meta-x11-selection.c +++ b/src/x11/meta-x11-selection.c @@ -156,7 +156,7 @@ write_mimetypes_cb (GOutputStream *stream, if (error) { - g_warning ("Could not fetch selection mimetypes: %s\n", error->message); + g_warning ("Could not fetch selection mimetypes: %s", error->message); g_error_free (error); } }