libadwaita/mismatched-va_args.patch
Christian Hergert 4e821a174a Fix various openscan issues
Resolves: RHEL-38648
2024-06-12 23:22:01 +00:00

53 lines
1.4 KiB
Diff

From a717b3ee38bdf348ede2992de6b2345200f4f468 Mon Sep 17 00:00:00 2001
From: Christian Hergert <chergert@redhat.com>
Date: Wed, 12 Jun 2024 15:48:06 -0700
Subject: [PATCH] va_args: fix umatched va_start()
va_list on some architectures require a va_end() to restore state which
may have been spilled. In this case it is easier to just avoid calling
va_start() altogether.
---
src/adw-alert-dialog.c | 4 ++--
src/adw-message-dialog.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/adw-alert-dialog.c b/src/adw-alert-dialog.c
index 7c002a4a..48d5d773 100644
--- a/src/adw-alert-dialog.c
+++ b/src/adw-alert-dialog.c
@@ -1784,11 +1784,11 @@ adw_alert_dialog_add_responses (AdwAlertDialog *self,
g_return_if_fail (ADW_IS_ALERT_DIALOG (self));
- va_start (args, first_id);
-
if (!first_id)
return;
+ va_start (args, first_id);
+
id = first_id;
label = va_arg (args, const char *);
diff --git a/src/adw-message-dialog.c b/src/adw-message-dialog.c
index cb3d3548..e36876fd 100644
--- a/src/adw-message-dialog.c
+++ b/src/adw-message-dialog.c
@@ -1917,11 +1917,11 @@ adw_message_dialog_add_responses (AdwMessageDialog *self,
g_return_if_fail (ADW_IS_MESSAGE_DIALOG (self));
- va_start (args, first_id);
-
if (!first_id)
return;
+ va_start (args, first_id);
+
id = first_id;
label = va_arg (args, const char *);
--
2.45.1