Commit 07808097 authored by Robert Ancell's avatar Robert Ancell

Fix some compiler warnings

parent 4ef012c2
......@@ -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);
......
......@@ -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;
......
......@@ -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 ();
......
......@@ -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);
......
......@@ -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);
......
......@@ -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",
......
......@@ -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);
......
......@@ -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*
......
......@@ -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)
......
......@@ -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"))
......
......@@ -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"));
......
......@@ -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);
......
......@@ -638,8 +638,6 @@ main (int argc, char *argv[])
{ NULL }
};
g_type_init();
context = g_option_context_new ("");
g_option_context_set_summary (context,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment