archrelease: copy trunk to extra-x86_64
[arch-packages.git] / leafpad / repos / extra-x86_64 / 0001-fix-format-security-error-from-gcc.patch
blob929babc422bb6aad0844e657852a251b7c624fa8
1 From a489f3678d5e037f44d4aa1e02b7eb30c9097666 Mon Sep 17 00:00:00 2001
2 From: Christian Hesse <mail@eworm.de>
3 Date: Tue, 13 Dec 2022 00:22:04 +0100
4 Subject: [PATCH 1/1] fix format-security error from gcc
6 Building with `-Werror=format-security` causes several of these errors:
8 error: format not a string literal and no format arguments [-Werror=format-security]
10 Let's fix by giving a proper format string.
11 ---
12 src/dialog.c | 4 ++--
13 src/gtkprint.c | 2 +-
14 2 files changed, 3 insertions(+), 3 deletions(-)
16 diff --git a/src/dialog.c b/src/dialog.c
17 index 14b69d7..5c4fe82 100644
18 --- a/src/dialog.c
19 +++ b/src/dialog.c
20 @@ -36,7 +36,7 @@ void run_dialog_message(GtkWidget *window,
21 GTK_DIALOG_DESTROY_WITH_PARENT,
22 type,
23 GTK_BUTTONS_NONE,
24 - str);
25 + "%s", str);
26 gtk_window_set_resizable(GTK_WINDOW(dialog), FALSE);
27 gtk_dialog_add_buttons(GTK_DIALOG(dialog),
28 GTK_STOCK_OK, GTK_RESPONSE_CANCEL, NULL);
29 @@ -61,7 +61,7 @@ GtkWidget *create_dialog_message_question(GtkWidget *window, gchar *message, ...
30 GTK_DIALOG_DESTROY_WITH_PARENT,
31 GTK_MESSAGE_QUESTION,
32 GTK_BUTTONS_NONE,
33 - str);
34 + "%s", str);
35 gtk_window_set_resizable(GTK_WINDOW(dialog), FALSE);
36 gtk_dialog_add_buttons(GTK_DIALOG(dialog),
37 GTK_STOCK_NO, GTK_RESPONSE_NO,
38 diff --git a/src/gtkprint.c b/src/gtkprint.c
39 index 3f39384..75e2f68 100644
40 --- a/src/gtkprint.c
41 +++ b/src/gtkprint.c
42 @@ -165,7 +165,7 @@ static void create_error_dialog(GtkTextView *text_view, gchar *message)
43 GTK_DIALOG_DESTROY_WITH_PARENT,
44 GTK_MESSAGE_ERROR,
45 GTK_BUTTONS_NONE,
46 - message);
47 + "%s", message);
48 gtk_window_set_resizable(GTK_WINDOW(dialog), FALSE);
49 gtk_dialog_add_buttons(GTK_DIALOG(dialog),
50 GTK_STOCK_OK, GTK_RESPONSE_CANCEL, NULL);
51 --
52 2.39.0