summaryrefslogtreecommitdiff
path: root/source/l/GConf/patches/0011-Fix-some-compiler-warnings.patch
blob: 7595b3fa988d66b5de80105752c4202ccaa27ad8 (plain)
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
From 0780809731c8ab1c364202b1900d3df106b28626 Mon Sep 17 00:00:00 2001
From: Robert Ancell <robert.ancell@canonical.com>
Date: Wed, 14 Oct 2015 10:09:49 +0100
Subject: [PATCH 11/11] Fix some compiler warnings

---
 backends/markup-tree.c             |  3 +--
 backends/xml-entry.c               | 11 ++++-------
 backends/xml-test.c                |  4 +---
 defaults/gconf-defaults-main.c     |  4 +---
 defaults/gconf-defaults.c          |  5 +----
 examples/basic-gconf-app.c         | 10 +++++-----
 examples/complex-gconf-app.c       |  6 +++---
 gconf/gconf-client.c               |  2 --
 gconf/gconf-internals.c            |  2 --
 gconf/gconfd.c                     |  4 ----
 gconf/gconftool.c                  |  2 --
 gconf/testgconfclient.c            |  4 ++--
 gsettings/gsettings-data-convert.c |  2 --
 13 files changed, 18 insertions(+), 41 deletions(-)

diff --git a/backends/markup-tree.c b/backends/markup-tree.c
index 4857cae..be975f4 100644
--- a/backends/markup-tree.c
+++ b/backends/markup-tree.c
@@ -3116,11 +3116,10 @@ parse_li_element (GMarkupParseContext  *context,
                   ParseInfo            *info,
                   GError              **error)
 {
-  ParseState current_state;
   GConfValue *value;
   GConfValue *list;
 
-  current_state = peek_state (info);
+  peek_state (info);
 
   push_state (info, STATE_LI);
   
diff --git a/backends/xml-entry.c b/backends/xml-entry.c
index 738883f..129c032 100644
--- a/backends/xml-entry.c
+++ b/backends/xml-entry.c
@@ -498,10 +498,8 @@ node_set_schema_value(xmlNodePtr node,
   
   if (gconf_schema_get_long_desc (sc))
     {
-      xmlNodePtr ld_node;
-      
-      ld_node = xmlNewChild(found, NULL, (xmlChar *)"longdesc", 
-                            (xmlChar *)gconf_schema_get_long_desc (sc));
+      xmlNewChild(found, NULL, (xmlChar *)"longdesc",
+                  (xmlChar *)gconf_schema_get_long_desc (sc));
     }
 }
 
@@ -536,7 +534,6 @@ node_set_value(xmlNodePtr node, GConfValue* value)
       break;
     case GCONF_VALUE_STRING:
       {
-        xmlNodePtr child;
         xmlChar* encoded;
         
         free_childs(node);
@@ -544,8 +541,8 @@ node_set_value(xmlNodePtr node, GConfValue* value)
         encoded = xmlEncodeEntitiesReentrant(node->doc,
                                              (xmlChar *)gconf_value_get_string(value));
         
-        child = xmlNewChild(node, NULL, (xmlChar *)"stringvalue",
-                            encoded);
+        xmlNewChild(node, NULL, (xmlChar *)"stringvalue",
+                    encoded);
         xmlFree(encoded);
       }
       break;      
diff --git a/backends/xml-test.c b/backends/xml-test.c
index 687d558..a57fc00 100644
--- a/backends/xml-test.c
+++ b/backends/xml-test.c
@@ -33,9 +33,7 @@ GConfBackendVTable* gconf_backend_get_vtable (void);
 int
 main (int argc, char **argv)
 {
-  GConfBackendVTable *vtable;
-
-  vtable = gconf_backend_get_vtable ();
+  gconf_backend_get_vtable ();
   
   xml_test_entry ();
   xml_test_dir ();
diff --git a/defaults/gconf-defaults-main.c b/defaults/gconf-defaults-main.c
index 7ed7700..aad76c3 100644
--- a/defaults/gconf-defaults-main.c
+++ b/defaults/gconf-defaults-main.c
@@ -107,7 +107,6 @@ get_system_bus (void)
 {
         GError          *error;
         DBusGConnection *bus;
-        DBusConnection  *connection;
 
         error = NULL;
         bus = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error);
@@ -117,7 +116,7 @@ get_system_bus (void)
                 goto out;
         }
 
-        connection = dbus_g_connection_get_connection (bus);
+        dbus_g_connection_get_connection (bus);
  out:
         return bus;
 }
@@ -162,7 +161,6 @@ main (int argc, char **argv)
                 g_thread_init (NULL);
         }
         dbus_g_thread_init ();
-        g_type_init ();
 
 	options = g_option_context_new (NULL);
 	g_option_context_add_main_entries (options, entries, NULL);
diff --git a/defaults/gconf-defaults.c b/defaults/gconf-defaults.c
index b84c632..76aa7e9 100644
--- a/defaults/gconf-defaults.c
+++ b/defaults/gconf-defaults.c
@@ -156,9 +156,6 @@ gconf_defaults_constructor (GType                  type,
                             GObjectConstructParam *construct_properties)
 {
         GConfDefaults      *mechanism;
-        GConfDefaultsClass *klass;
-
-        klass = GCONF_DEFAULTS_CLASS (g_type_class_peek (GCONF_TYPE_DEFAULTS));
 
         mechanism = GCONF_DEFAULTS (G_OBJECT_CLASS (gconf_defaults_parent_class)->constructor (
                                                 type,
@@ -228,7 +225,7 @@ register_mechanism (GConfDefaults *mechanism)
 {
         GError *error = NULL;
 
-        mechanism->priv->auth = polkit_authority_get ();
+        mechanism->priv->auth = polkit_authority_get_sync (NULL, NULL);
 
         error = NULL;
         mechanism->priv->system_bus_connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error);
diff --git a/examples/basic-gconf-app.c b/examples/basic-gconf-app.c
index a866520..3045ff9 100644
--- a/examples/basic-gconf-app.c
+++ b/examples/basic-gconf-app.c
@@ -289,7 +289,7 @@ create_main_window (GConfClient *client)
 
   gtk_window_set_title (GTK_WINDOW (w), "basic-gconf-app Main Window");
   
-  vbox = gtk_vbox_new (FALSE, 5);
+  vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
 
   gtk_container_add (GTK_CONTAINER (w), vbox);
 
@@ -375,7 +375,7 @@ create_config_entry (GtkWidget   *prefs_dialog,
   GtkWidget *label;
   char *str;
 
-  hbox = gtk_hbox_new (FALSE, 5);
+  hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5);
 
   label = gtk_label_new (config_key);
   
@@ -437,7 +437,7 @@ create_prefs_dialog (GtkWidget   *parent,
   dialog = gtk_dialog_new_with_buttons ("basic-gconf-app Preferences",
                                         GTK_WINDOW (parent),
                                         0,
-                                        GTK_STOCK_CLOSE,
+                                        "_Close",
                                         GTK_RESPONSE_ACCEPT,
                                         NULL);
 
@@ -451,11 +451,11 @@ create_prefs_dialog (GtkWidget   *parent,
   /* resizing doesn't grow the entries anyhow */
   gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
   
-  vbox = gtk_vbox_new (FALSE, 5);
+  vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
 
   gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
   
-  gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area(dialog)),
+  gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area(GTK_DIALOG(dialog))),
                       vbox, TRUE, TRUE, 0);
 
   entry = create_config_entry (dialog, client, "/apps/basic-gconf-app/foo",
diff --git a/examples/complex-gconf-app.c b/examples/complex-gconf-app.c
index 567989c..0702673 100644
--- a/examples/complex-gconf-app.c
+++ b/examples/complex-gconf-app.c
@@ -246,7 +246,7 @@ create_main_window(GConfClient* client)
   
   w = gtk_window_new(GTK_WINDOW_TOPLEVEL);
 
-  vbox = gtk_vbox_new(FALSE, 10);
+  vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 10);
 
   gtk_container_add(GTK_CONTAINER(w), vbox);
   
@@ -620,9 +620,9 @@ create_prefs_dialog(GtkWidget* parent, GConfClient* client)
   
   bbox = gtk_hbutton_box_new();
 
-  vbox_outer = gtk_vbox_new(FALSE, 10);
+  vbox_outer = gtk_box_new(GTK_ORIENTATION_VERTICAL, 10);
 
-  vbox_inner = gtk_vbox_new(FALSE, 10);
+  vbox_inner = gtk_box_new(GTK_ORIENTATION_VERTICAL, 10);
   
   gtk_container_add(GTK_CONTAINER(dialog), vbox_outer);
 
diff --git a/gconf/gconf-client.c b/gconf/gconf-client.c
index 16be032..3c8ba50 100644
--- a/gconf/gconf-client.c
+++ b/gconf/gconf-client.c
@@ -442,8 +442,6 @@ notify_from_server_callback (GConfEngine* conf, guint cnxn_id,
  * #GConfClient, this function returns the same one they're using, but
  * with the reference count incremented. So you have to unref either way.
  *
- * It's important to call g_type_init() before using this GObject, to initialize the type system.
- *
  * Return value: (transfer full): a new #GConfClient. g_object_unref() when you're done.
  */
 GConfClient*
diff --git a/gconf/gconf-internals.c b/gconf/gconf-internals.c
index 1b4452a..ecb3179 100644
--- a/gconf/gconf-internals.c
+++ b/gconf/gconf-internals.c
@@ -2483,8 +2483,6 @@ get_ior (gboolean start_if_not_found,
                 return NULL;
         }
 
-        g_type_init ();
-
         connection = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, &error);
         if (connection == NULL) {
                 if (failure_log)
diff --git a/gconf/gconfd.c b/gconf/gconfd.c
index 1ed3d08..97647b5 100644
--- a/gconf/gconfd.c
+++ b/gconf/gconfd.c
@@ -682,10 +682,6 @@ system_bus_message_handler (DBusConnection *connection,
 			    DBusMessage    *message,
 			    void           *user_data)
 {
-  DBusMessage *reply;
-
-  reply = NULL;
-
   if (dbus_message_is_signal (message,
 			      "org.gnome.GConf.Defaults",
                               "SystemSet"))
diff --git a/gconf/gconftool.c b/gconf/gconftool.c
index 94274af..1f09601 100644
--- a/gconf/gconftool.c
+++ b/gconf/gconftool.c
@@ -578,8 +578,6 @@ main (int argc, char** argv)
   bindtextdomain (GETTEXT_PACKAGE,GCONF_LOCALE_DIR);
   textdomain (GETTEXT_PACKAGE);
 
-  g_thread_init (NULL);
-
   _gconf_init_i18n ();
   
   context = g_option_context_new (N_("- Tool to manipulate a GConf configuration"));
diff --git a/gconf/testgconfclient.c b/gconf/testgconfclient.c
index 7058bbb..f17b85f 100644
--- a/gconf/testgconfclient.c
+++ b/gconf/testgconfclient.c
@@ -131,7 +131,7 @@ entry_attached_to(GConfClient* client, const gchar* key)
                    G_CALLBACK(entry_destroyed_callback),
                    client);
   
-  hbox = gtk_hbox_new(FALSE, 10);
+  hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 10);
 
   label = gtk_label_new(key);
 
@@ -268,7 +268,7 @@ create_controls(GConfClient* client)
   g_signal_connect(G_OBJECT(win), "destroy",
                    G_CALLBACK(destroy_callback), client);
 
-  vbox = gtk_vbox_new(FALSE, 10);
+  vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 10);
 
   gtk_container_add(GTK_CONTAINER(win), vbox);
 
diff --git a/gsettings/gsettings-data-convert.c b/gsettings/gsettings-data-convert.c
index 160ed41..ced04c7 100644
--- a/gsettings/gsettings-data-convert.c
+++ b/gsettings/gsettings-data-convert.c
@@ -638,8 +638,6 @@ main (int argc, char *argv[])
     { NULL }
   };
 
-  g_type_init();
-
   context = g_option_context_new ("");
 
   g_option_context_set_summary (context,
-- 
2.6.4