[libchamplain] Add G_GNUC_UNUSED where appropriate so LLVM clang doesn't complain
- From: Jiří Techet <jiritechet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libchamplain] Add G_GNUC_UNUSED where appropriate so LLVM clang doesn't complain
- Date: Fri, 14 May 2010 00:21:08 +0000 (UTC)
commit 2c62c0bb005b2932e2aa056d7bcc04e294b2d50c
Author: JiÅ?Ã Techet <techet gmail com>
Date: Wed May 12 21:48:05 2010 +0200
Add G_GNUC_UNUSED where appropriate so LLVM clang doesn't complain
Signed-off-by: JiÅ?Ã Techet <techet gmail com>
champlain/champlain-base-marker.c | 2 +-
champlain/champlain-layer.c | 10 +++---
champlain/champlain-local-map-data-source.c | 4 +-
champlain/champlain-map-data-source.c | 2 +-
champlain/champlain-map-source-chain.c | 4 +-
champlain/champlain-map-source-factory.c | 8 +++---
champlain/champlain-map-source.c | 4 +-
champlain/champlain-marker.c | 4 +-
champlain/champlain-memphis-tile-source.c | 4 +-
champlain/champlain-network-map-data-source.c | 2 +-
champlain/champlain-network-tile-source.c | 6 ++--
champlain/champlain-selection-layer.c | 4 +-
champlain/champlain-tile.c | 2 +-
champlain/champlain-view.c | 34 ++++++++++++------------
demos/launcher.c | 10 +++---
demos/markers.c | 2 +-
demos/polygons.c | 8 +++---
demos/url-marker.c | 2 +-
18 files changed, 56 insertions(+), 56 deletions(-)
---
diff --git a/champlain/champlain-base-marker.c b/champlain/champlain-base-marker.c
index c143eac..1f395d8 100644
--- a/champlain/champlain-base-marker.c
+++ b/champlain/champlain-base-marker.c
@@ -395,7 +395,7 @@ on_idle (ChamplainBaseMarker* marker)
}
static void
-on_animation_completed (ClutterAnimation* animation,
+on_animation_completed (G_GNUC_UNUSED ClutterAnimation* animation,
ChamplainBaseMarker *marker)
{
g_idle_add ((GSourceFunc) on_idle, marker);
diff --git a/champlain/champlain-layer.c b/champlain/champlain-layer.c
index 6704ac8..5e8b8c5 100644
--- a/champlain/champlain-layer.c
+++ b/champlain/champlain-layer.c
@@ -63,7 +63,7 @@ static void layer_remove_cb (ClutterGroup *layer,
static void
champlain_layer_get_property (GObject *object,
guint property_id,
- GValue *value,
+ G_GNUC_UNUSED GValue *value,
GParamSpec *pspec)
{
//ChamplainLayer *self = CHAMPLAIN_LAYER (object);
@@ -77,7 +77,7 @@ champlain_layer_get_property (GObject *object,
static void
champlain_layer_set_property (GObject *object,
guint property_id,
- const GValue *value,
+ G_GNUC_UNUSED const GValue *value,
GParamSpec *pspec)
{
//ChamplainLayer *self = CHAMPLAIN_LAYER (object);
@@ -149,7 +149,7 @@ reorder_marker (ClutterGroup *layer,
static void
marker_position_notify (GObject *gobject,
- GParamSpec *pspec,
+ G_GNUC_UNUSED GParamSpec *pspec,
gpointer user_data)
{
reorder_marker (CLUTTER_GROUP (user_data), CHAMPLAIN_BASE_MARKER (gobject));
@@ -158,7 +158,7 @@ marker_position_notify (GObject *gobject,
static void
layer_add_cb (ClutterGroup *layer,
ClutterActor *actor,
- gpointer data)
+ G_GNUC_UNUSED gpointer data)
{
ChamplainBaseMarker *marker = CHAMPLAIN_BASE_MARKER (actor);
reorder_marker (layer, marker);
@@ -170,7 +170,7 @@ layer_add_cb (ClutterGroup *layer,
static void
layer_remove_cb (ClutterGroup *layer,
ClutterActor *actor,
- gpointer data)
+ G_GNUC_UNUSED gpointer data)
{
g_signal_handlers_disconnect_by_func (G_OBJECT (actor),
G_CALLBACK (marker_position_notify), layer);
diff --git a/champlain/champlain-local-map-data-source.c b/champlain/champlain-local-map-data-source.c
index 4573830..792005a 100644
--- a/champlain/champlain-local-map-data-source.c
+++ b/champlain/champlain-local-map-data-source.c
@@ -48,7 +48,7 @@ struct _ChamplainLocalMapDataSourcePrivate {
static void
champlain_local_map_data_source_get_property (GObject *object,
guint property_id,
- GValue *value,
+ G_GNUC_UNUSED GValue *value,
GParamSpec *pspec)
{
switch (property_id)
@@ -61,7 +61,7 @@ champlain_local_map_data_source_get_property (GObject *object,
static void
champlain_local_map_data_source_set_property (GObject *object,
guint property_id,
- const GValue *value,
+ G_GNUC_UNUSED const GValue *value,
GParamSpec *pspec)
{
switch (property_id)
diff --git a/champlain/champlain-map-data-source.c b/champlain/champlain-map-data-source.c
index 47b93ac..194c5ec 100644
--- a/champlain/champlain-map-data-source.c
+++ b/champlain/champlain-map-data-source.c
@@ -121,7 +121,7 @@ champlain_map_data_source_finalize (GObject *object)
}
static MemphisMap *
-champlain_map_data_source_real_get_map_data (ChamplainMapDataSource *self)
+champlain_map_data_source_real_get_map_data (G_GNUC_UNUSED ChamplainMapDataSource *self)
{
g_error ("Should not be reached");
return NULL;
diff --git a/champlain/champlain-map-source-chain.c b/champlain/champlain-map-source-chain.c
index 70a5fb3..80f0922 100644
--- a/champlain/champlain-map-source-chain.c
+++ b/champlain/champlain-map-source-chain.c
@@ -224,7 +224,7 @@ fill_tile (ChamplainMapSource *map_source,
static void
on_set_next_source (ChamplainMapSource *map_source,
- ChamplainMapSource *old_next_source,
+ G_GNUC_UNUSED ChamplainMapSource *old_next_source,
ChamplainMapSource *new_next_source)
{
ChamplainMapSourceChain *source_chain = CHAMPLAIN_MAP_SOURCE_CHAIN (map_source);
@@ -258,7 +258,7 @@ assign_cache_of_next_source_sequence (ChamplainMapSourceChain *source_chain,
}
static void
-reload_tiles_cb (ChamplainMapSource *map_source,
+reload_tiles_cb (G_GNUC_UNUSED ChamplainMapSource *map_source,
ChamplainMapSourceChain *source_chain)
{
/* propagate the signal from the chain that is inside champlain_map_source_chain */
diff --git a/champlain/champlain-map-source-factory.c b/champlain/champlain-map-source-factory.c
index e4a062c..6f8b46d 100644
--- a/champlain/champlain-map-source-factory.c
+++ b/champlain/champlain-map-source-factory.c
@@ -89,7 +89,7 @@ static ChamplainMapSource * champlain_map_source_new_memphis (
static void
champlain_map_source_factory_get_property (GObject *object,
guint prop_id,
- GValue *value,
+ G_GNUC_UNUSED GValue *value,
GParamSpec *pspec)
{
//ChamplainMapSourceFactory *map_source_factory = CHAMPLAIN_MAP_SOURCE_FACTORY(object);
@@ -105,7 +105,7 @@ champlain_map_source_factory_get_property (GObject *object,
static void
champlain_map_source_factory_set_property (GObject *object,
guint prop_id,
- const GValue *value,
+ G_GNUC_UNUSED const GValue *value,
GParamSpec *pspec)
{
//ChamplainMapSourceFactory *map_source_factory = CHAMPLAIN_MAP_SOURCE_FACTORY(object);
@@ -455,7 +455,7 @@ champlain_map_source_factory_register (ChamplainMapSourceFactory *factory,
static ChamplainMapSource *
champlain_map_source_new_generic (
- ChamplainMapSourceDesc *desc, gpointer user_data)
+ ChamplainMapSourceDesc *desc, G_GNUC_UNUSED gpointer user_data)
{
return CHAMPLAIN_MAP_SOURCE (champlain_network_tile_source_new_full (
desc->id,
@@ -472,7 +472,7 @@ champlain_map_source_new_generic (
#ifdef CHAMPLAIN_HAS_MEMPHIS
static ChamplainMapSource *
champlain_map_source_new_memphis (ChamplainMapSourceDesc *desc,
- gpointer user_data)
+ G_GNUC_UNUSED gpointer user_data)
{
ChamplainMapDataSource *map_data_source;
diff --git a/champlain/champlain-map-source.c b/champlain/champlain-map-source.c
index 28f7367..0c2ffea 100644
--- a/champlain/champlain-map-source.c
+++ b/champlain/champlain-map-source.c
@@ -236,7 +236,7 @@ champlain_map_source_get_next_source (ChamplainMapSource *map_source)
}
static
-void reload_tiles_cb (ChamplainMapSource *orig, ChamplainMapSource *self)
+void reload_tiles_cb (G_GNUC_UNUSED ChamplainMapSource *orig, ChamplainMapSource *self)
{
/* propagate the signal up the chain */
g_signal_emit_by_name (self, "reload-tiles", NULL);
@@ -604,7 +604,7 @@ gdouble
champlain_map_source_get_meters_per_pixel (ChamplainMapSource *map_source,
guint zoom_level,
gdouble latitude,
- gdouble longitude)
+ G_GNUC_UNUSED gdouble longitude)
{
g_return_val_if_fail (CHAMPLAIN_IS_MAP_SOURCE (map_source), 0.0);
diff --git a/champlain/champlain-marker.c b/champlain/champlain-marker.c
index abc030f..6efa649 100644
--- a/champlain/champlain-marker.c
+++ b/champlain/champlain-marker.c
@@ -788,8 +788,8 @@ champlain_marker_queue_redraw (ChamplainMarker *marker)
static void
notify_highlighted (GObject *gobject,
- GParamSpec *pspec,
- gpointer user_data)
+ G_GNUC_UNUSED GParamSpec *pspec,
+ G_GNUC_UNUSED gpointer user_data)
{
champlain_marker_queue_redraw (CHAMPLAIN_MARKER (gobject));
}
diff --git a/champlain/champlain-memphis-tile-source.c b/champlain/champlain-memphis-tile-source.c
index 8d08c0b..7733649 100644
--- a/champlain/champlain-memphis-tile-source.c
+++ b/champlain/champlain-memphis-tile-source.c
@@ -294,7 +294,7 @@ ChamplainMemphisTileSource* champlain_memphis_tile_source_new_full (const gchar
static void
map_data_changed_cb (ChamplainMapDataSource *map_data_source,
- GParamSpec *gobject,
+ G_GNUC_UNUSED GParamSpec *gobject,
ChamplainMemphisTileSource *tile_source)
{
g_assert (CHAMPLAIN_IS_MAP_DATA_SOURCE (map_data_source) &&
@@ -417,7 +417,7 @@ cleanup:
static void
memphis_worker_thread (gpointer worker_data,
- gpointer user_data)
+ G_GNUC_UNUSED gpointer user_data)
{
WorkerThreadData *data = (WorkerThreadData *)worker_data;
ChamplainMemphisTileSource *tile_source = CHAMPLAIN_MEMPHIS_TILE_SOURCE (data->map_source);
diff --git a/champlain/champlain-network-map-data-source.c b/champlain/champlain-network-map-data-source.c
index ac45b87..1490aaf 100644
--- a/champlain/champlain-network-map-data-source.c
+++ b/champlain/champlain-network-map-data-source.c
@@ -233,7 +233,7 @@ champlain_network_map_data_source_new (void)
}
static void
-load_map_data_cb (SoupSession *session, SoupMessage *msg,
+load_map_data_cb (G_GNUC_UNUSED SoupSession *session, SoupMessage *msg,
gpointer user_data)
{
ChamplainNetworkMapDataSource *self =
diff --git a/champlain/champlain-network-tile-source.c b/champlain/champlain-network-tile-source.c
index ff67329..5a7a421 100644
--- a/champlain/champlain-network-tile-source.c
+++ b/champlain/champlain-network-tile-source.c
@@ -490,7 +490,7 @@ get_tile_uri (ChamplainNetworkTileSource *tile_source,
}
static void
-tile_destroyed_cb (ChamplainTile *tile,
+tile_destroyed_cb (G_GNUC_UNUSED ChamplainTile *tile,
TileDestroyedCbData *data)
{
if (data->map_source && data->msg)
@@ -504,7 +504,7 @@ tile_destroyed_cb (ChamplainTile *tile,
static void
destroy_cb_data (TileDestroyedCbData *data,
- GClosure *closure)
+ G_GNUC_UNUSED GClosure *closure)
{
if (data->map_source)
g_object_remove_weak_pointer(G_OBJECT (data->map_source), (gpointer*)&data->map_source);
@@ -513,7 +513,7 @@ destroy_cb_data (TileDestroyedCbData *data,
}
static void
-tile_loaded_cb (SoupSession *session,
+tile_loaded_cb (G_GNUC_UNUSED SoupSession *session,
SoupMessage *msg,
gpointer user_data)
{
diff --git a/champlain/champlain-selection-layer.c b/champlain/champlain-selection-layer.c
index b7a71b5..0531ce9 100644
--- a/champlain/champlain-selection-layer.c
+++ b/champlain/champlain-selection-layer.c
@@ -220,7 +220,7 @@ marker_clicked_cb (ClutterActor *actor,
static void
layer_add_cb (ClutterGroup *layer,
ClutterActor *actor,
- gpointer data)
+ G_GNUC_UNUSED gpointer data)
{
ChamplainBaseMarker *marker = CHAMPLAIN_BASE_MARKER (actor);
@@ -233,7 +233,7 @@ layer_add_cb (ClutterGroup *layer,
static void
layer_remove_cb (ClutterGroup *layer,
ClutterActor *actor,
- gpointer data)
+ G_GNUC_UNUSED gpointer data)
{
g_signal_handlers_disconnect_by_func (G_OBJECT (actor),
G_CALLBACK (marker_clicked_cb), layer);
diff --git a/champlain/champlain-tile.c b/champlain/champlain-tile.c
index 1be8277..57bb159 100644
--- a/champlain/champlain-tile.c
+++ b/champlain/champlain-tile.c
@@ -509,7 +509,7 @@ champlain_tile_set_size (ChamplainTile *self,
}
static void
-fade_in_completed (ClutterAnimation *animation, ChamplainTile *self)
+fade_in_completed (G_GNUC_UNUSED ClutterAnimation *animation, ChamplainTile *self)
{
if (clutter_group_get_n_children (CLUTTER_GROUP (self)) > 1)
clutter_actor_destroy (clutter_group_get_nth_child (CLUTTER_GROUP (self), 0));
diff --git a/champlain/champlain-view.c b/champlain/champlain-view.c
index 18ef0e5..b2a2870 100644
--- a/champlain/champlain-view.c
+++ b/champlain/champlain-view.c
@@ -361,7 +361,7 @@ update_viewport (ChamplainView *view,
}
static void
-panning_completed (TidyFingerScroll *scroll,
+panning_completed (G_GNUC_UNUSED TidyFingerScroll *scroll,
ChamplainView *view)
{
gfloat x, y;
@@ -373,7 +373,7 @@ panning_completed (TidyFingerScroll *scroll,
}
static gboolean
-scroll_event (ClutterActor *actor,
+scroll_event (G_GNUC_UNUSED ClutterActor *actor,
ClutterScrollEvent *event,
ChamplainView *view)
{
@@ -410,14 +410,14 @@ marker_reposition_cb (ChamplainMarker *marker,
static void
notify_marker_reposition_cb (ChamplainMarker *marker,
- GParamSpec *arg1,
+ G_GNUC_UNUSED GParamSpec *arg1,
ChamplainView *view)
{
marker_reposition_cb (marker, view);
}
static void
-layer_add_marker_cb (ClutterGroup *layer,
+layer_add_marker_cb (G_GNUC_UNUSED ClutterGroup *layer,
ChamplainMarker *marker,
ChamplainView *view)
{
@@ -471,7 +471,7 @@ redraw_polygon_on_idle (PolygonRedrawContext *ctx)
static void
notify_polygon_cb (ChamplainPolygon *polygon,
- GParamSpec *arg1,
+ G_GNUC_UNUSED GParamSpec *arg1,
ChamplainView *view)
{
ChamplainViewPrivate *priv = view->priv;
@@ -851,7 +851,7 @@ champlain_view_realize (ClutterActor *actor)
*/
static void
champlain_view_get_preferred_width (ClutterActor *actor,
- gfloat for_height,
+ G_GNUC_UNUSED gfloat for_height,
gfloat *min_width,
gfloat *nat_width)
{
@@ -867,7 +867,7 @@ champlain_view_get_preferred_width (ClutterActor *actor,
static void
champlain_view_get_preferred_height (ClutterActor *actor,
- gfloat for_width,
+ G_GNUC_UNUSED gfloat for_width,
gfloat *min_height,
gfloat *nat_height)
{
@@ -1180,7 +1180,7 @@ create_license (ChamplainView *view)
}
static gboolean
-button_release_cb (ClutterActor *actor,
+button_release_cb (G_GNUC_UNUSED ClutterActor *actor,
ClutterEvent *event,
ChamplainView *view)
{
@@ -1516,8 +1516,8 @@ perform_update_cb (ChamplainView *view)
}
static void
-viewport_pos_changed_cb (GObject *gobject,
- GParamSpec *arg1,
+viewport_pos_changed_cb (G_GNUC_UNUSED GObject *gobject,
+ G_GNUC_UNUSED GParamSpec *arg1,
ChamplainView *view)
{
ChamplainViewPrivate *priv = view->priv;
@@ -1582,7 +1582,7 @@ update_license (ChamplainView *view)
}
static gboolean
-finger_scroll_button_press_cb (ClutterActor *actor,
+finger_scroll_button_press_cb (G_GNUC_UNUSED ClutterActor *actor,
ClutterButtonEvent *event,
ChamplainView *view)
{
@@ -1678,7 +1678,7 @@ champlain_view_scroll_down (ChamplainView* view)
static gboolean
-finger_scroll_key_press_cb (ClutterActor *actor,
+finger_scroll_key_press_cb (G_GNUC_UNUSED ClutterActor *actor,
ClutterKeyEvent *event,
ChamplainView *view)
{
@@ -1830,8 +1830,8 @@ champlain_view_center_on (ChamplainView *view,
}
static void
-timeline_new_frame (ClutterTimeline *timeline,
- gint frame_num,
+timeline_new_frame (G_GNUC_UNUSED ClutterTimeline *timeline,
+ G_GNUC_UNUSED gint frame_num,
GoToContext *ctx)
{
gdouble alpha;
@@ -1848,7 +1848,7 @@ timeline_new_frame (ClutterTimeline *timeline,
}
static void
-timeline_completed (ClutterTimeline *timeline,
+timeline_completed (G_GNUC_UNUSED ClutterTimeline *timeline,
ChamplainView *view)
{
champlain_view_stop_go_to (view);
@@ -2400,7 +2400,7 @@ view_position_tile (ChamplainView* view,
}
static void
-view_reload_tiles_cb (ChamplainMapSource *map_source,
+view_reload_tiles_cb (G_GNUC_UNUSED ChamplainMapSource *map_source,
ChamplainView* view)
{
clutter_group_remove_all (CLUTTER_GROUP (view->priv->map_layer));
@@ -2429,7 +2429,7 @@ tile_destroyed_cb (GObject *gobject,
static void
tile_state_notify (GObject *gobject,
- GParamSpec *pspec,
+ G_GNUC_UNUSED GParamSpec *pspec,
gpointer data)
{
view_update_state (CHAMPLAIN_VIEW (data), CHAMPLAIN_TILE (gobject));
diff --git a/demos/launcher.c b/demos/launcher.c
index ab1bd0d..c369afa 100644
--- a/demos/launcher.c
+++ b/demos/launcher.c
@@ -22,7 +22,7 @@
#define PADDING 10
static gboolean
-map_view_button_release_cb (ClutterActor *actor,
+map_view_button_release_cb (G_GNUC_UNUSED ClutterActor *actor,
ClutterButtonEvent *event,
ChamplainView * view)
{
@@ -39,8 +39,8 @@ map_view_button_release_cb (ClutterActor *actor,
}
static gboolean
-zoom_in (ClutterActor *actor,
- ClutterButtonEvent *event,
+zoom_in (G_GNUC_UNUSED ClutterActor *actor,
+ G_GNUC_UNUSED ClutterButtonEvent *event,
ChamplainView * view)
{
champlain_view_zoom_in (view);
@@ -48,8 +48,8 @@ zoom_in (ClutterActor *actor,
}
static gboolean
-zoom_out (ClutterActor *actor,
- ClutterButtonEvent *event,
+zoom_out (G_GNUC_UNUSED ClutterActor *actor,
+ G_GNUC_UNUSED ClutterButtonEvent *event,
ChamplainView * view)
{
champlain_view_zoom_out (view);
diff --git a/demos/markers.c b/demos/markers.c
index 992643b..20ec3b3 100644
--- a/demos/markers.c
+++ b/demos/markers.c
@@ -41,7 +41,7 @@ marker_button_release_cb (ClutterActor *actor,
*/
ChamplainLayer *
-create_marker_layer (ChamplainView *view)
+create_marker_layer (G_GNUC_UNUSED ChamplainView *view)
{
ClutterActor *marker;
ChamplainLayer *layer;
diff --git a/demos/polygons.c b/demos/polygons.c
index 00e3bf6..23d63b3 100644
--- a/demos/polygons.c
+++ b/demos/polygons.c
@@ -21,8 +21,8 @@
#define PADDING 10
static gboolean
-zoom_in (ClutterActor *actor,
- ClutterButtonEvent *event,
+zoom_in (G_GNUC_UNUSED ClutterActor *actor,
+ G_GNUC_UNUSED ClutterButtonEvent *event,
ChamplainView * view)
{
champlain_view_zoom_in (view);
@@ -30,8 +30,8 @@ zoom_in (ClutterActor *actor,
}
static gboolean
-zoom_out (ClutterActor *actor,
- ClutterButtonEvent *event,
+zoom_out (G_GNUC_UNUSED ClutterActor *actor,
+ G_GNUC_UNUSED ClutterButtonEvent *event,
ChamplainView * view)
{
champlain_view_zoom_out (view);
diff --git a/demos/url-marker.c b/demos/url-marker.c
index 530a185..f975c78 100644
--- a/demos/url-marker.c
+++ b/demos/url-marker.c
@@ -60,7 +60,7 @@ pixbuf_new_from_message (SoupMessage *message,
gdk_pixbuf_loader_write (
loader,
- message->response_body->data,
+ (guchar *)message->response_body->data,
message->response_body->length,
error);
if (*error != NULL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]