Ana Guerrero 2023-11-29 20:19:00 +00:00 committed by Git OBS Bridge
commit e6c24c6ba1
4 changed files with 110 additions and 10 deletions

View File

@ -0,0 +1,44 @@
From 41d0dc1db4d75c37ba67fe903105b4e162d42f1a Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Mon, 20 Nov 2023 11:31:31 +0100
Subject: [PATCH] power: Fix uninitialised variable warning
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
In function do_lid_closed_action,
inlined from logind_proxy_changed_cb at plugins/power/gsd-power-manager.c:1579:17:
plugins/power/gsd-power-manager.c:1538:20: warning: is_inhibited may be used uninitialized [-Wmaybe-uninitialized]
1538 | if (is_inhibited) {
| ^
plugins/power/gsd-power-manager.c: In function logind_proxy_changed_cb:
plugins/power/gsd-power-manager.c:1533:26: note: is_inhibited was declared here
1533 | gboolean is_inhibited;
| ^~~~~~~~~~~~
plugins/power/gsd-power-manager.c: In function idle_configure:
plugins/power/gsd-power-manager.c:1977:12: warning: is_inhibited may be used uninitialized [-Wmaybe-uninitialized]
1977 | if (!is_action_inhibited (manager, action_type)) {
| ^
plugins/power/gsd-power-manager.c:1354:18: note: is_inhibited was declared here
1354 | gboolean is_inhibited;
| ^~~~~~~~~~~~
---
plugins/power/gsd-power-manager.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/plugins/power/gsd-power-manager.c b/plugins/power/gsd-power-manager.c
index f0ca3aee..b3da23a8 100644
--- a/plugins/power/gsd-power-manager.c
+++ b/plugins/power/gsd-power-manager.c
@@ -1861,6 +1861,8 @@ idle_is_session_inhibited (GsdPowerManager *manager,
GVariant *variant;
GsmInhibitorFlag inhibited_actions;
+ *is_inhibited = FALSE;
+
/* not yet connected to gnome-session */
if (manager->session == NULL)
return FALSE;
--
GitLab

View File

@ -0,0 +1,35 @@
From a059909d62da0c11774f1089d02937699fabf150 Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Mon, 20 Nov 2023 11:29:48 +0100
Subject: [PATCH] power: Fix enum mismatch warning
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[1/2] Compiling C object plugins/power/gsd-power.p/gsd-power-manager.c.o
plugins/power/gsd-power-manager.c:1872:1: warning: conflicting types for idle_is_session_inhibited due to enum/integer mismatch; have gboolean(GsdPowerManager *, GsmInhibitorFlag, gboolean *) {aka int(struct _GsdPowerManager *, GsmInhibitorFlag, int *)} [-Wenum-int-mismatch]
1872 | idle_is_session_inhibited (GsdPowerManager *manager,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
plugins/power/gsd-power-manager.c:237:18: note: previous declaration of idle_is_session_inhibited with type gboolean(GsdPowerManager *, guint, gboolean *) {aka int(struct _GsdPowerManager *, unsigned int, int *)}
237 | static gboolean idle_is_session_inhibited (GsdPowerManager *manager, guint mask, gboolean *is_inhibited);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
---
plugins/power/gsd-power-manager.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/power/gsd-power-manager.c b/plugins/power/gsd-power-manager.c
index 0aa3b546d..f0ca3aee4 100644
--- a/plugins/power/gsd-power-manager.c
+++ b/plugins/power/gsd-power-manager.c
@@ -235,7 +235,7 @@ static void uninhibit_lid_switch (GsdPowerManager *manager);
static void stop_inhibit_lid_switch_timer (GsdPowerManager *manager);
static void sync_lid_inhibitor (GsdPowerManager *manager);
static void main_battery_or_ups_low_changed (GsdPowerManager *manager, gboolean is_low);
-static gboolean idle_is_session_inhibited (GsdPowerManager *manager, guint mask, gboolean *is_inhibited);
+static gboolean idle_is_session_inhibited (GsdPowerManager *manager, GsmInhibitorFlag mask, gboolean *is_inhibited);
static void idle_triggered_idle_cb (GnomeIdleMonitor *monitor, guint watch_id, gpointer user_data);
static void idle_became_active_cb (GnomeIdleMonitor *monitor, guint watch_id, gpointer user_data);
static void iio_proxy_changed (GsdPowerManager *manager);
--
GitLab

View File

@ -1,3 +1,18 @@
-------------------------------------------------------------------
Tue Nov 28 12:06:23 UTC 2023 - Dominique Leuenberger <dimstar@opensuse.org>
- Use %patch -p N instead of deprecated %patchN.
-------------------------------------------------------------------
Sun Nov 26 12:06:19 UTC 2023 - Bjørn Lie <bjorn.lie@gmail.com>
- Add a059909d62da0c11774f1089d02937699fabf150.patch: power: Fix
enum mismatch warning
- Add 41d0dc1db4d75c37ba67fe903105b4e162d42f1a.patch: power: Fix
uninitialised variable warning
- Renumber patches, ensure we have a patch0 when upstream patches
are available in future release.
-------------------------------------------------------------------
Thu Oct 26 08:40:13 UTC 2023 - Bjørn Lie <bjorn.lie@gmail.com>

View File

@ -39,13 +39,17 @@ URL: https://gitlab.gnome.org/GNOME/gnome-settings-daemon
Source0: https://download.gnome.org/sources/gnome-settings-daemon/45/%{name}-%{version}.tar.xz
# PATCH-FIX-OPENSUSE gnome-settings-daemon-initial-keyboard.patch bsc#979051 boo#1009515 federico@suse.com -- Deal with the default keyboard being set from xkb instead of GNOME
Patch1: gnome-settings-daemon-initial-keyboard.patch
Patch0: gnome-settings-daemon-initial-keyboard.patch
# PATCH-FIX-OPENSUSE gnome-settings-daemon-switch-Japanese-default-input-to-mozc.patch bnc#1029083 boo#1056289 qzhao@suse.com -- Switch new user's default input engine from "anthy" to "mozc" in gnome-desktop with Japanese language and ibus input frame-work condition.
Patch2: gnome-settings-daemon-switch-Japanese-default-input-to-mozc.patch
Patch1: gnome-settings-daemon-switch-Japanese-default-input-to-mozc.patch
# PATCH-FIX-UPSTREAM gnome-settings-daemon-bgo793253.patch bgo#793253 dimstar@opensuse.org -- Fix no-return-in-nonvoid-function
Patch3: gnome-settings-daemon-bgo793253.patch
Patch2: gnome-settings-daemon-bgo793253.patch
# PATCH-FIX-UPSTREAM 538816ff42f682fc4b541810ca107486abab9976.patch -- smartcard: Steal error when propagating through GTask
Patch0: https://gitlab.gnome.org/GNOME/gnome-settings-daemon/-/commit/538816ff42f682fc4b541810ca107486abab9976.patch
Patch3: https://gitlab.gnome.org/GNOME/gnome-settings-daemon/-/commit/538816ff42f682fc4b541810ca107486abab9976.patch
# PATCH-FIX-UPSTREAM a059909d62da0c11774f1089d02937699fabf150.patch -- power: Fix enum mismatch warning
Patch4: https://gitlab.gnome.org/GNOME/gnome-settings-daemon/-/commit/a059909d62da0c11774f1089d02937699fabf150.patch
# PATCH-FIX-UPSTREAM 41d0dc1db4d75c37ba67fe903105b4e162d42f1a.patch -- power: Fix uninitialised variable warning
Patch5: https://gitlab.gnome.org/GNOME/gnome-settings-daemon/-/commit/41d0dc1db4d75c37ba67fe903105b4e162d42f1a.patch
## SLE/LEAP-only patches start at 1000
# PATCH-FEATURE-OPENSUSE gnome-settings-daemon-notify-idle-resumed.patch bnc#439018 bnc#708182 bgo#575467 hpj@suse.com -- notify user about auto suspend when returning from sleep
@ -148,16 +152,18 @@ contact the settings daemon via its DBus interface.
%if ! 0%{?sle_version}
%autopatch -p1 -M 999
%else
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch -P 0 -p1
%patch -P 1 -p1
%patch -P 2 -p1
%patch -P 3 -p1
%patch -P 4 -p1
%patch -P 5 -p1
%endif
# Enable the patches for both Leap 15 and SLE 15, please find the clarification at bsc#1158476.
%if 0%{?sle_version} >= 150000
%patch1000 -p1
%patch1001 -p1
%patch -P 1000 -p1
%patch -P 1001 -p1
%endif
%build