[cluttermm_tutorial] Partly fix the build with --enable-warnings=fatal



commit 1c823f9110034daac9fd29136e484436041294cb
Author: Murray Cumming <murrayc murrayc com>
Date:   Mon Sep 13 16:19:52 2010 +0200

    Partly fix the build with --enable-warnings=fatal
    
    * configure.ac: Add  -Wno-long-long because the clutter headers trigger it.
    * examples/custom_container/examplebox.cc:
    * examples/full_example/main.cc:
    * examples/score/main.cc: Comment out unused parameters and use
      RefPtr::reset() instead of deprecated RefPtr::clear().

 ChangeLog                               |   10 ++++++++++
 configure.ac                            |    2 +-
 examples/custom_container/examplebox.cc |    4 ++--
 examples/full_example/main.cc           |   10 +++++-----
 examples/score/main.cc                  |    8 ++++----
 5 files changed, 22 insertions(+), 12 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 4f20301..40cc65f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2010-09-13  Murray Cumming  <murrayc murrayc com>
+
+	Partly fix the build with --enable-warnings=fatal
+
+	* configure.ac: Add  -Wno-long-long because the clutter headers trigger it.
+	* examples/custom_container/examplebox.cc:
+	* examples/full_example/main.cc:
+	* examples/score/main.cc: Comment out unused parameters and use
+  RefPtr::reset() instead of deprecated RefPtr::clear().
+
 2010-09-02  Murray Cumming  <murrayc murrayc com>
 
 	Fix some runtime errors.
diff --git a/configure.ac b/configure.ac
index 9c4825f..6614e9f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -36,7 +36,7 @@ AC_LANG([C++])
 # would make --enable-warnings=fatal unusable.
 DK_ARG_ENABLE_WARNINGS([TUTORIAL_WXXFLAGS],
                        [-Wall -w1 -Wno-non-virtual-dtor],
-                       [-pedantic -Wall -Wextra -w1 -Wno-non-virtual-dtor],
+                       [-pedantic -Wall -Wextra -w1 -Wno-non-virtual-dtor -Wno-long-long],
                        [GLIBMM GTKMM])
 
 AC_CONFIG_FILES([Makefile])
diff --git a/examples/custom_container/examplebox.cc b/examples/custom_container/examplebox.cc
index 916f864..9660767 100644
--- a/examples/custom_container/examplebox.cc
+++ b/examples/custom_container/examplebox.cc
@@ -160,7 +160,7 @@ void Box::get_preferred_width_vfunc(float  for_height,
   float min_width     = 0;
   float natural_width = 0;
 
-  // Calculate the preferred width for this container, 
+  // Calculate the preferred width for this container,
   // based on the preferred width requested by the children.
   for(ChildrenList::iterator p = children_.begin(); p != children_.end(); ++p)
     if((*p)->is_visible())
@@ -182,7 +182,7 @@ void Box::get_preferred_width_vfunc(float  for_height,
  * For this container, the preferred height is the maximum height
  * of the children. The preferred height is independent of the given width.
  */
-void Box::get_preferred_height_vfunc(float  for_width,
+void Box::get_preferred_height_vfunc(float /* for_width */,
                                      float& min_height_p,
                                      float& natural_height_p)
 {
diff --git a/examples/full_example/main.cc b/examples/full_example/main.cc
index f2eadac..6ca3cd8 100644
--- a/examples/full_example/main.cc
+++ b/examples/full_example/main.cc
@@ -241,10 +241,10 @@ void Example::add_image_actors()
 void Example::on_timeline_moveup_completed()
 {
   // Forget this timeline because we have now finished with it:
-  timeline_moveup_.clear();
-  behaviour_scale_.clear();
-  behaviour_path_.clear();
-  behaviour_opacity_.clear();
+  timeline_moveup_.reset();
+  behaviour_scale_.reset();
+  behaviour_path_.reset();
+  behaviour_opacity_.reset();
 }
 
 /*
@@ -360,7 +360,7 @@ void Example::rotate_item_to_front(std::list<Item>::iterator pitem)
   timeline_rotation_->start();
 }
 
-bool Example::on_texture_button_press(Clutter::ButtonEvent* event, std::list<Item>::iterator pitem)
+bool Example::on_texture_button_press(Clutter::ButtonEvent* /* event */, std::list<Item>::iterator pitem)
 {
   // Ignore the events if the timeline_rotation is running (meaning,
   // if the objects are moving), to simplify things.
diff --git a/examples/score/main.cc b/examples/score/main.cc
index b111b71..98dcf8e 100644
--- a/examples/score/main.cc
+++ b/examples/score/main.cc
@@ -28,8 +28,8 @@ static int color_change_count = 0;
 /*
  * Rotate the rectangle and alternate its color.
  */
-static void on_timeline_rotation_new_frame(int frame_num,
-  Glib::RefPtr<Clutter::Timeline> timeline)
+static void on_timeline_rotation_new_frame(int /* frame_num */,
+  Glib::RefPtr<Clutter::Timeline> /* timeline */)
 {
   if(++rotation_angle >= 360)
     rotation_angle = 0;
@@ -52,8 +52,8 @@ static void on_timeline_rotation_new_frame(int frame_num,
 /*
  * Move the rectangle.
  */
-static void on_timeline_move_new_frame(int frame_num,
-  Glib::RefPtr<Clutter::Timeline> timeline)
+static void on_timeline_move_new_frame(int /* frame_num */,
+  Glib::RefPtr<Clutter::Timeline> /* timeline */)
 {
   int x_position = rect->get_x();
 



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