[clutter/clutter-1.14] Fix compilers warnings when debugging is disabled



commit 37f0fba0a6e12676a6688e5e6cb4c479d1a2604a
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Mon Mar 25 17:57:28 2013 +0000

    Fix compilers warnings when debugging is disabled

 clutter/clutter-script-parser.c   |    4 ----
 clutter/clutter-stage.c           |   17 ++++++++---------
 clutter/x11/clutter-backend-x11.c |    7 +++----
 clutter/x11/clutter-stage-x11.c   |    5 ++++-
 4 files changed, 15 insertions(+), 18 deletions(-)
---
diff --git a/clutter/clutter-script-parser.c b/clutter/clutter-script-parser.c
index 6eb6b2b..e424d29 100644
--- a/clutter/clutter-script-parser.c
+++ b/clutter/clutter-script-parser.c
@@ -1781,7 +1781,6 @@ apply_layout_properties (ClutterScript    *script,
 {
   ClutterScriptable *scriptable = NULL;
   ClutterScriptableIface *iface = NULL;
-  gboolean set_custom_property = FALSE;
   gboolean parse_custom_node = FALSE;
   GList *l, *unresolved, *properties;
   ClutterLayoutManager *manager;
@@ -1806,7 +1805,6 @@ apply_layout_properties (ClutterScript    *script,
       iface = CLUTTER_SCRIPTABLE_GET_IFACE (scriptable);
 
       parse_custom_node = iface->parse_custom_node != NULL ? TRUE : FALSE;
-      set_custom_property = iface->set_custom_property != NULL ? TRUE : FALSE;
     }
 
   properties = oinfo->properties;
@@ -1887,7 +1885,6 @@ apply_child_properties (ClutterScript    *script,
 {
   ClutterScriptable *scriptable = NULL;
   ClutterScriptableIface *iface = NULL;
-  gboolean set_custom_property = FALSE;
   gboolean parse_custom_node = FALSE;
   GList *l, *unresolved, *properties;
   GObjectClass *klass;
@@ -1906,7 +1903,6 @@ apply_child_properties (ClutterScript    *script,
       iface = CLUTTER_SCRIPTABLE_GET_IFACE (scriptable);
 
       parse_custom_node = iface->parse_custom_node != NULL ? TRUE : FALSE;
-      set_custom_property = iface->set_custom_property != NULL ? TRUE : FALSE;
     }
 
   properties = oinfo->properties;
diff --git a/clutter/clutter-stage.c b/clutter/clutter-stage.c
index 70bfd51..333a3d3 100644
--- a/clutter/clutter-stage.c
+++ b/clutter/clutter-stage.c
@@ -368,11 +368,6 @@ clutter_stage_allocate (ClutterActor           *self,
   float new_width, new_height;
   float width, height;
   cairo_rectangle_int_t window_size;
-  gboolean origin_changed;
-
-  origin_changed = (flags & CLUTTER_ABSOLUTE_ORIGIN_CHANGED)
-                 ? TRUE
-                 : FALSE;
 
   if (priv->impl == NULL)
     return;
@@ -395,9 +390,11 @@ clutter_stage_allocate (ClutterActor           *self,
   if (!clutter_feature_available (CLUTTER_FEATURE_STAGE_STATIC))
     {
       CLUTTER_NOTE (LAYOUT,
-                    "Following allocation to %.2fx%.2f (origin %s)",
+                    "Following allocation to %.2fx%.2f (absolute origin %s)",
                     width, height,
-                    origin_changed ? "changed" : "not changed");
+                    (flags & CLUTTER_ABSOLUTE_ORIGIN_CHANGED)
+                      ? "changed"
+                      : "not changed");
 
       clutter_actor_set_allocation (self, box,
                                     flags | CLUTTER_DELEGATE_LAYOUT);
@@ -451,11 +448,13 @@ clutter_stage_allocate (ClutterActor           *self,
 
       CLUTTER_NOTE (LAYOUT,
                     "Overriding original allocation of %dx%d "
-                    "with %.2fx%.2f (origin %s)",
+                    "with %.2fx%.2f (absolute origin %s)",
                     width, height,
                     (int) (override.x2),
                     (int) (override.y2),
-                    origin_changed ? "changed" : "not changed");
+                    (flags & CLUTTER_ABSOLUTE_ORIGIN_CHANGED)
+                      ? "changed"
+                      : "not changed");
 
       /* and store the overridden allocation */
       clutter_actor_set_allocation (self, &override,
diff --git a/clutter/x11/clutter-backend-x11.c b/clutter/x11/clutter-backend-x11.c
index bd9cac3..cff80ff 100644
--- a/clutter/x11/clutter-backend-x11.c
+++ b/clutter/x11/clutter-backend-x11.c
@@ -773,7 +773,6 @@ clutter_backend_x11_create_stage (ClutterBackend  *backend,
                                  ClutterStage    *wrapper,
                                  GError         **error)
 {
-  ClutterBackendX11 *backend_x11 = CLUTTER_BACKEND_X11 (backend);
   ClutterEventTranslator *translator;
   ClutterStageWindow *stage;
 
@@ -787,9 +786,9 @@ clutter_backend_x11_create_stage (ClutterBackend  *backend,
   _clutter_backend_add_event_translator (backend, translator);
 
   CLUTTER_NOTE (MISC, "X11 stage created (display:%p, screen:%d, root:%u)",
-                backend_x11->xdpy,
-                backend_x11->xscreen_num,
-                (unsigned int) backend_x11->xwin_root);
+                CLUTTER_BACKEND_X11 (backend_x11)->xdpy,
+                CLUTTER_BACKEND_X11 (backend_x11)->xscreen_num,
+                (unsigned int) CLUTTER_BACKEND_X11 (backend_x11)->xwin_root);
 
   return stage;
 }
diff --git a/clutter/x11/clutter-stage-x11.c b/clutter/x11/clutter-stage-x11.c
index 685baa5..230172c 100644
--- a/clutter/x11/clutter-stage-x11.c
+++ b/clutter/x11/clutter-stage-x11.c
@@ -926,12 +926,14 @@ handle_wm_protocols_event (ClutterBackendX11 *backend_x11,
                            ClutterStageX11   *stage_x11,
                            XEvent            *xevent)
 {
-  ClutterStageCogl *stage_cogl = CLUTTER_STAGE_COGL (stage_x11);
   Atom atom = (Atom) xevent->xclient.data.l[0];
 
   if (atom == backend_x11->atom_WM_DELETE_WINDOW &&
       xevent->xany.window == stage_x11->xwin)
     {
+#ifdef CLUTTER_ENABLE_DEBUG
+      ClutterStageCogl *stage_cogl = CLUTTER_STAGE_COGL (stage_x11);
+
       /* the WM_DELETE_WINDOW is a request: we do not destroy
        * the window right away, as it might contain vital data;
        * we relay the event to the application and we let it
@@ -941,6 +943,7 @@ handle_wm_protocols_event (ClutterBackendX11 *backend_x11,
                     _clutter_actor_get_debug_name (CLUTTER_ACTOR (stage_cogl->wrapper)),
                     stage_cogl->wrapper,
                     (unsigned int) stage_x11->xwin);
+#endif /* CLUTTER_ENABLE_DEBUG */
 
       set_user_time (backend_x11, stage_x11, xevent->xclient.data.l[1]);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]