Package: gtk+2.0 / 2.24.32-3

Fix-compiler-warnings-with-GCC-8.1.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
From: John Lindgren <john@jlindgren.net>
Date: Tue, 15 May 2018 21:47:12 -0400
Subject: Fix compiler warnings with GCC 8.1.
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

GCC 8.1 added some new warnings, including warning about parentheses
with no effect in variable declarations.  GTK2 headers have a few of
these, which produce a lot of warnings in projects using GTK2.

The warnings look like:
/usr/include/gtk-2.0/gtk/gtkfilechooserbutton.h:59:8: warning:
unnecessary parentheses in declaration of ‘__gtk_reserved1’ [-Wparentheses]
   void (*__gtk_reserved1);
        ^

Removing the parentheses is harmless and fixes the warnings.

Origin: upstream, 2.24.33, commit:889a63dffc72c048502d0f7d2b26bfc8532462eb
---
 gtk/gtkfilechooserbutton.h | 14 +++++++-------
 gtk/gtkstatusicon.h        |  4 ++--
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/gtk/gtkfilechooserbutton.h b/gtk/gtkfilechooserbutton.h
index b3d9112..fdacc4b 100644
--- a/gtk/gtkfilechooserbutton.h
+++ b/gtk/gtkfilechooserbutton.h
@@ -56,13 +56,13 @@ struct _GtkFileChooserButtonClass
 
   void (* file_set) (GtkFileChooserButton *fc);
 
-  void (*__gtk_reserved1);
-  void (*__gtk_reserved2);
-  void (*__gtk_reserved3);
-  void (*__gtk_reserved4);
-  void (*__gtk_reserved5);
-  void (*__gtk_reserved6);
-  void (*__gtk_reserved7);
+  void *__gtk_reserved1;
+  void *__gtk_reserved2;
+  void *__gtk_reserved3;
+  void *__gtk_reserved4;
+  void *__gtk_reserved5;
+  void *__gtk_reserved6;
+  void *__gtk_reserved7;
 };
 
 
diff --git a/gtk/gtkstatusicon.h b/gtk/gtkstatusicon.h
index 19dbd1c..c45caca 100644
--- a/gtk/gtkstatusicon.h
+++ b/gtk/gtkstatusicon.h
@@ -73,8 +73,8 @@ struct _GtkStatusIconClass
                                      gboolean        keyboard_mode,
                                      GtkTooltip     *tooltip);
 
-  void (*__gtk_reserved1);
-  void (*__gtk_reserved2);
+  void *__gtk_reserved1;
+  void *__gtk_reserved2;
 };
 
 GType                 gtk_status_icon_get_type           (void) G_GNUC_CONST;