d1a98a01b8
- calendar: Use the new "%OB" format if supported - Fix compiler warnings with GCC 8.1 https://bugzilla.redhat.com/show_bug.cgi?id=1669768
68 lines
2.0 KiB
Diff
68 lines
2.0 KiB
Diff
From 889a63dffc72c048502d0f7d2b26bfc8532462eb Mon Sep 17 00:00:00 2001
|
||
From: John Lindgren <john@jlindgren.net>
|
||
Date: Tue, 15 May 2018 21:47:12 -0400
|
||
Subject: [PATCH] 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.
|
||
---
|
||
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 b3d9112cf9..fdacc4b6ec 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 19dbd1cdeb..c45caca5ae 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;
|
||
--
|
||
2.20.1
|
||
|