[clutter/clutter-1.6] Compilation fixes for suncc



commit e0e9c3fc4f3f32c07e998807c383c5677cf71001
Author: Emmanuele Bassi <ebassi linux intel com>
Date:   Mon Jul 18 13:49:45 2011 +0100

    Compilation fixes for suncc
    
    Clutter 1.6.16 does not compile on Solaris due to the following
    syntax errors. Sun Studio compiler doesn't like using "return"
    with void functions, and there seems to be a parens issue in
    cogl-debug.h.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=654718

 clutter/clutter-main.c          |    2 +-
 clutter/cogl/cogl/cogl-bitmap.c |   10 ++++++++--
 clutter/cogl/cogl/cogl-debug.h  |    2 +-
 3 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/clutter/clutter-main.c b/clutter/clutter-main.c
index d8b19f7..90a8818 100644
--- a/clutter/clutter-main.c
+++ b/clutter/clutter-main.c
@@ -3289,7 +3289,7 @@ _clutter_context_release_id (guint32 id_)
 {
   ClutterMainContext *context = _clutter_context_get_default ();
 
-  return _clutter_id_pool_remove (context->id_pool, id_);
+  _clutter_id_pool_remove (context->id_pool, id_);
 }
 
 void
diff --git a/clutter/cogl/cogl/cogl-bitmap.c b/clutter/cogl/cogl/cogl-bitmap.c
index cc83dda..88ad073 100644
--- a/clutter/cogl/cogl/cogl-bitmap.c
+++ b/clutter/cogl/cogl/cogl-bitmap.c
@@ -432,7 +432,10 @@ _cogl_bitmap_unmap (CoglBitmap *bitmap)
 {
   /* Divert to another bitmap if this data is shared */
   if (bitmap->shared_bmp)
-    return _cogl_bitmap_unmap (bitmap->shared_bmp);
+    {
+      _cogl_bitmap_unmap (bitmap->shared_bmp);
+      return;
+    }
 
   g_assert (bitmap->mapped);
   bitmap->mapped = FALSE;
@@ -484,7 +487,10 @@ _cogl_bitmap_unbind (CoglBitmap *bitmap)
 {
   /* Divert to another bitmap if this data is shared */
   if (bitmap->shared_bmp)
-    return _cogl_bitmap_unbind (bitmap->shared_bmp);
+    {
+      _cogl_bitmap_unbind (bitmap->shared_bmp);
+      return;
+    }
 
   g_assert (bitmap->bound);
   bitmap->bound = FALSE;
diff --git a/clutter/cogl/cogl/cogl-debug.h b/clutter/cogl/cogl/cogl-debug.h
index 0cd039f..7b6bf13 100644
--- a/clutter/cogl/cogl/cogl-debug.h
+++ b/clutter/cogl/cogl/cogl-debug.h
@@ -104,7 +104,7 @@ extern unsigned int _cogl_debug_flags[COGL_DEBUG_N_INTS];
 
 #else
 #define COGL_NOTE(type,...)                         G_STMT_START {            \
-        if (G_UNLIKELY (COGL_DEBUG_ENABLED (COGL_DEBUG_##type)) {             \
+        if (G_UNLIKELY (COGL_DEBUG_ENABLED (COGL_DEBUG_##type))) {            \
           char *_fmt = g_strdup_printf (__VA_ARGS__);                         \
           _cogl_profile_trace_message ("[" #type "] " G_STRLOC " & %s", _fmt);\
           g_free (_fmt);                                                      \



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