aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/ephy-dbus.c20
-rw-r--r--lib/ephy-debug.h22
-rw-r--r--lib/ephy-file-chooser.c2
-rw-r--r--lib/ephy-file-helpers.c2
-rw-r--r--lib/ephy-langs.c2
-rw-r--r--lib/ephy-module.c10
-rw-r--r--lib/ephy-node-db.c6
-rw-r--r--lib/ephy-shlib-loader.c4
-rw-r--r--lib/widgets/ephy-location-entry.c8
-rw-r--r--lib/widgets/ephy-spinner.c8
-rw-r--r--lib/widgets/ephy-tree-model-node.c2
-rw-r--r--lib/widgets/ephy-tree-model-sort.c2
12 files changed, 50 insertions, 38 deletions
diff --git a/lib/ephy-dbus.c b/lib/ephy-dbus.c
index 3b76b0614..835bf1e36 100644
--- a/lib/ephy-dbus.c
+++ b/lib/ephy-dbus.c
@@ -116,7 +116,7 @@ session_filter_func (DBusConnection *connection,
DBUS_INTERFACE_ORG_FREEDESKTOP_LOCAL,
"Disconnected"))
{
- LOG ("EphyDbus disconnected from session bus")
+ LOG ("EphyDbus disconnected from session bus");
dbus_connection_unref (dbus->priv->session_bus);
dbus->priv->session_bus = NULL;
@@ -140,13 +140,13 @@ system_filter_func (DBusConnection *connection,
{
EphyDbus *dbus = EPHY_DBUS (user_data);
- LOG ("EphyDbus filtering message from system bus")
+ LOG ("EphyDbus filtering message from system bus");
if (dbus_message_is_signal (message,
DBUS_INTERFACE_ORG_FREEDESKTOP_LOCAL,
"Disconnected"))
{
- LOG ("EphyDbus disconnected from system bus")
+ LOG ("EphyDbus disconnected from system bus");
dbus_connection_unref (dbus->priv->system_bus);
dbus->priv->system_bus = NULL;
@@ -167,7 +167,7 @@ ephy_dbus_connect_to_system_bus (EphyDbus *dbus)
DBusConnection *bus;
DBusError error;
- LOG ("EphyDbus connecting to system DBUS")
+ LOG ("EphyDbus connecting to system DBUS");
dbus_error_init (&error);
bus = dbus_bus_get (DBUS_BUS_SYSTEM, &error);
@@ -200,7 +200,7 @@ ephy_dbus_connect_to_session_bus (EphyDbus *dbus)
DBusError error;
DBusConnection *bus;
- LOG ("EphyDbus connecting to session DBUS")
+ LOG ("EphyDbus connecting to session DBUS");
dbus_error_init (&error);
bus = dbus_bus_get (DBUS_BUS_SESSION, &error);
@@ -250,7 +250,7 @@ path_message_func (DBusConnection *connection,
{
DBusHandlerResult result = DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
- LOG ("EphyDbus filtering path messagefrom session bus")
+ LOG ("EphyDbus filtering path messagefrom session bus");
if (dbus_message_is_method_call (message, epiphany_dbus_service, "load"))
{
@@ -268,7 +268,7 @@ ephy_dbus_startup (EphyDbus *dbus)
{
g_return_if_fail (EPHY_IS_DBUS (dbus));
- LOG ("EphyDbus startup")
+ LOG ("EphyDbus startup");
ephy_dbus_connect_to_session_bus (dbus);
ephy_dbus_connect_to_system_bus (dbus);
@@ -279,7 +279,7 @@ ephy_dbus_shutdown (EphyDbus *dbus)
{
g_return_if_fail (EPHY_IS_DBUS (dbus));
- LOG ("EphyDbus shutdown")
+ LOG ("EphyDbus shutdown");
if (dbus->priv->reconnect_timeout_id != 0)
{
@@ -320,7 +320,7 @@ ephy_dbus_init (EphyDbus *dbus)
{
dbus->priv = EPHY_DBUS_GET_PRIVATE (dbus);
- LOG ("EphyDbus initialising")
+ LOG ("EphyDbus initialising");
}
static void
@@ -330,7 +330,7 @@ ephy_dbus_finalize (GObject *object)
ephy_dbus_shutdown (dbus);
- LOG ("EphyDbus finalised")
+ LOG ("EphyDbus finalised");
parent_class->finalize (object);
}
diff --git a/lib/ephy-debug.h b/lib/ephy-debug.h
index f2311e49b..2c49158a7 100644
--- a/lib/ephy-debug.h
+++ b/lib/ephy-debug.h
@@ -32,13 +32,25 @@ G_BEGIN_DECLS
#define DISABLE_PROFILING
#endif
+#if defined(G_HAVE_GNUC_VARARGS)
+
#ifdef DISABLE_LOGGING
-#define LOG(msg, args...)
+#define LOG(msg, args...) G_STMT_START { } G_STMT_END
#else
-#define LOG(msg, args...) \
-g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, \
- "[ %s ] " msg, \
- __FILE__ , ## args);
+#define LOG(msg, args...) \
+g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, \
+ "[ %s ] " msg, \
+ __FILE__ , ## args)
+#endif
+
+#elif defined(G_HAVE_ISO_VARARGS)
+
+#define LOG(...) G_STMT_START { } G_STMT_END
+
+#else /* no varargs macros */
+
+static void LOG(const char *format, ...) {}
+
#endif
#ifdef DISABLE_PROFILING
diff --git a/lib/ephy-file-chooser.c b/lib/ephy-file-chooser.c
index ad6f2a624..4ce3b38d4 100644
--- a/lib/ephy-file-chooser.c
+++ b/lib/ephy-file-chooser.c
@@ -128,7 +128,7 @@ ephy_file_chooser_finalize (GObject *object)
g_free (dialog->priv->persist_key);
- LOG ("EphyFileChooser finalised")
+ LOG ("EphyFileChooser finalised");
G_OBJECT_CLASS (parent_class)->finalize (object);
}
diff --git a/lib/ephy-file-helpers.c b/lib/ephy-file-helpers.c
index 5be893dc6..f1f62bae5 100644
--- a/lib/ephy-file-helpers.c
+++ b/lib/ephy-file-helpers.c
@@ -229,7 +229,7 @@ ephy_file_helpers_shutdown (void)
if (mime_table != NULL)
{
- LOG ("Destroying mime type hashtable")
+ LOG ("Destroying mime type hashtable");
g_hash_table_destroy (mime_table);
mime_table = NULL;
}
diff --git a/lib/ephy-langs.c b/lib/ephy-langs.c
index 927c37ebe..5e2de46f1 100644
--- a/lib/ephy-langs.c
+++ b/lib/ephy-langs.c
@@ -316,7 +316,7 @@ load_iso_entries (int iso,
char *filename;
int ret = -1;
- LOG ("Loading ISO-%d codes", iso)
+ LOG ("Loading ISO-%d codes", iso);
START_PROFILER ("Loading ISO codes")
diff --git a/lib/ephy-module.c b/lib/ephy-module.c
index fe31e39c6..4c6731461 100644
--- a/lib/ephy-module.c
+++ b/lib/ephy-module.c
@@ -85,7 +85,7 @@ ephy_module_load (GTypeModule *gmodule)
EphyModule *module = EPHY_MODULE (gmodule);
EphyModuleRegisterFunc register_func;
- LOG ("Loading %s", module->path)
+ LOG ("Loading %s", module->path);
module->library = g_module_open (module->path, 0);
@@ -123,7 +123,7 @@ ephy_module_unload (GTypeModule *gmodule)
{
EphyModule *module = EPHY_MODULE (gmodule);
- LOG ("Unloading %s", module->path)
+ LOG ("Unloading %s", module->path);
g_module_close (module->library);
@@ -142,7 +142,7 @@ ephy_module_get_path (EphyModule *module)
GObject *
ephy_module_new_object (EphyModule *module)
{
- LOG ("Creating object of type %s", g_type_name (module->type))
+ LOG ("Creating object of type %s", g_type_name (module->type));
if (module->type == 0)
{
@@ -155,7 +155,7 @@ ephy_module_new_object (EphyModule *module)
static void
ephy_module_init (EphyModule *module)
{
- LOG ("EphyModule %p initialising", module)
+ LOG ("EphyModule %p initialising", module);
}
static void
@@ -163,7 +163,7 @@ ephy_module_finalize (GObject *object)
{
EphyModule *module = EPHY_MODULE (object);
- LOG ("EphyModule %p finalising", module)
+ LOG ("EphyModule %p finalising", module);
g_free (module->path);
diff --git a/lib/ephy-node-db.c b/lib/ephy-node-db.c
index 591b7ec82..8f553491a 100644
--- a/lib/ephy-node-db.c
+++ b/lib/ephy-node-db.c
@@ -251,7 +251,7 @@ node_from_id_real (EphyNodeDb *db, guint id)
EphyNode *ret = NULL;
if (id < db->priv->id_to_node->len)
- ret = g_ptr_array_index (db->priv->id_to_node, id);;
+ ret = g_ptr_array_index (db->priv->id_to_node, id);
return ret;
}
@@ -380,7 +380,7 @@ ephy_node_db_load_from_file (EphyNodeDb *db,
gboolean was_immutable;
int ret;
- LOG ("ephy_node_db_load_from_file %s", xml_file)
+ LOG ("ephy_node_db_load_from_file %s", xml_file);
START_PROFILER ("loading node db")
@@ -468,7 +468,7 @@ ephy_node_db_write_to_xml_valist (EphyNodeDb *db,
EphyNode *node;
int ret;
- LOG ("Saving node db to %s", filename)
+ LOG ("Saving node db to %s", filename);
START_PROFILER ("Saving node db")
diff --git a/lib/ephy-shlib-loader.c b/lib/ephy-shlib-loader.c
index f5b759b64..3cf731dcb 100644
--- a/lib/ephy-shlib-loader.c
+++ b/lib/ephy-shlib-loader.c
@@ -110,7 +110,7 @@ ephy_shlib_loader_init (EphyShlibLoader *loader)
{
loader->priv = EPHY_SHLIB_LOADER_GET_PRIVATE (loader);
- LOG ("EphyShlibLoader initialising")
+ LOG ("EphyShlibLoader initialising");
}
static void
@@ -118,7 +118,7 @@ ephy_shlib_loader_finalize (GObject *object)
{
EphyShlibLoader *loader = EPHY_SHLIB_LOADER (object);
- LOG ("EphyShlibLoader finalising")
+ LOG ("EphyShlibLoader finalising");
g_slist_foreach (loader->priv->data, (GFunc) free_loader_data, NULL);
g_slist_free (loader->priv->data);
diff --git a/lib/widgets/ephy-location-entry.c b/lib/widgets/ephy-location-entry.c
index 39d614a45..3a922d5c3 100644
--- a/lib/widgets/ephy-location-entry.c
+++ b/lib/widgets/ephy-location-entry.c
@@ -488,7 +488,7 @@ entry_style_set_cb (GtkWidget *widget,
GtkStyle *previous_style,
EphyLocationEntry *entry)
{
- LOG ("entry_style_set_cb")
+ LOG ("entry_style_set_cb");
modify_background (entry);
}
@@ -497,7 +497,7 @@ static void
entry_realize_cb (GtkWidget *widget,
EphyLocationEntry *entry)
{
- LOG ("entry_realize_cb")
+ LOG ("entry_realize_cb");
modify_background (entry);
}
@@ -508,7 +508,7 @@ ephy_location_entry_construct_contents (EphyLocationEntry *entry)
EphyLocationEntryPrivate *priv = entry->priv;
GtkWidget *alignment, *frame, *hbox;
- LOG ("EphyLocationEntry constructing contents %p", entry)
+ LOG ("EphyLocationEntry constructing contents %p", entry);
alignment = gtk_alignment_new (0.0, 0.5, 1.0, 0.0);
gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 0, 0, 1, 1);
@@ -582,7 +582,7 @@ ephy_location_entry_init (EphyLocationEntry *le)
{
EphyLocationEntryPrivate *p;
- LOG ("EphyLocationEntry initialising %p", le)
+ LOG ("EphyLocationEntry initialising %p", le);
p = EPHY_LOCATION_ENTRY_GET_PRIVATE (le);
le->priv = p;
diff --git a/lib/widgets/ephy-spinner.c b/lib/widgets/ephy-spinner.c
index 7172e62ab..1ad7f442b 100644
--- a/lib/widgets/ephy-spinner.c
+++ b/lib/widgets/ephy-spinner.c
@@ -184,7 +184,7 @@ ephy_spinner_cache_load (EphySpinnerCache *cache)
int grid_width, grid_height, x, y, size, h, w;
const char *icon;
- LOG ("EphySpinnerCache loading")
+ LOG ("EphySpinnerCache loading");
ephy_spinner_cache_unload (cache);
@@ -334,7 +334,7 @@ ephy_spinner_cache_get_images (EphySpinnerCache *cache,
GList *element, *l;
int h, w;
- LOG ("Getting animation images at size %d", size)
+ LOG ("Getting animation images at size %d", size);
if (cache->priv->images == NULL || cache->priv->originals == NULL)
{
@@ -388,7 +388,7 @@ ephy_spinner_cache_init (EphySpinnerCache *cache)
{
cache->priv = EPHY_SPINNER_CACHE_GET_PRIVATE (cache);
- LOG ("EphySpinnerCache initialising")
+ LOG ("EphySpinnerCache initialising");
/* FIXME: icon theme is per-screen, not global */
cache->priv->icon_theme = gtk_icon_theme_get_default ();
@@ -403,7 +403,7 @@ ephy_spinner_cache_finalize (GObject *object)
{
EphySpinnerCache *cache = EPHY_SPINNER_CACHE (object);
- LOG ("EphySpinnerCache finalising")
+ LOG ("EphySpinnerCache finalising");
g_signal_handlers_disconnect_by_func
(cache->priv->icon_theme, G_CALLBACK(ephy_spinner_cache_load), cache);
diff --git a/lib/widgets/ephy-tree-model-node.c b/lib/widgets/ephy-tree-model-node.c
index 13ed2dbc8..e00ff1324 100644
--- a/lib/widgets/ephy-tree-model-node.c
+++ b/lib/widgets/ephy-tree-model-node.c
@@ -162,7 +162,7 @@ ephy_tree_model_node_update_node (EphyTreeModelNode *model,
path = get_path_real (model, node);
}
- LOG ("Updating row")
+ LOG ("Updating row");
gtk_tree_model_row_changed (GTK_TREE_MODEL (model), path, &iter);
gtk_tree_path_free (path);
diff --git a/lib/widgets/ephy-tree-model-sort.c b/lib/widgets/ephy-tree-model-sort.c
index 1c9ae1e4f..dc6af7982 100644
--- a/lib/widgets/ephy-tree-model-sort.c
+++ b/lib/widgets/ephy-tree-model-sort.c
@@ -206,7 +206,7 @@ each_property_get_data_binder (EphyDragEachSelectedItemDataGet iteratee,
g_return_if_fail (base_data != NULL);
- LOG ("Data get %s (%s)", base_data, extra_data)
+ LOG ("Data get %s (%s)", base_data, extra_data);
iteratee (base_data, extra_data, data);