[gjs] Squash a few compiler warnings



commit 11f22a36d7736b72f83e08a76d2d4bbe2486ee27
Author: Colin Walters <walters verbum org>
Date:   Mon Aug 20 12:46:32 2012 -0400

    Squash a few compiler warnings

 gi/boxed.c      |    3 +++
 gi/repo.c       |    3 +++
 gjs/byteArray.c |    2 +-
 3 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/gi/boxed.c b/gi/boxed.c
index 2b4fb18..44b4723 100644
--- a/gi/boxed.c
+++ b/gi/boxed.c
@@ -1037,6 +1037,9 @@ type_can_be_allocated_directly(GITypeInfo *type_info)
                 case GI_INFO_TYPE_UNRESOLVED:
                     is_simple = FALSE;
                     break;
+                case GI_INFO_TYPE_INVALID_0:
+                    g_assert_not_reached();
+                    break;
                 }
 
                 g_base_info_unref(interface);
diff --git a/gi/repo.c b/gi/repo.c
index 55c2cfa..3cc9773 100644
--- a/gi/repo.c
+++ b/gi/repo.c
@@ -695,6 +695,9 @@ gjs_info_type_name(GIInfoType type)
         return "TYPE";
     case GI_INFO_TYPE_UNRESOLVED:
         return "UNRESOLVED";
+    case GI_INFO_TYPE_INVALID_0:
+        g_assert_not_reached();
+        break;
     }
 
     return "???";
diff --git a/gjs/byteArray.c b/gjs/byteArray.c
index 14d744e..a037e58 100644
--- a/gjs/byteArray.c
+++ b/gjs/byteArray.c
@@ -540,7 +540,7 @@ to_string_func(JSContext *context,
         /* the internal data pointer could be NULL in this case */
         data = "";
     else
-        data = priv->array->data;
+        data = (gchar*)priv->array->data;
 
     if (encoding_is_utf8) {
         /* optimization, avoids iconv overhead and runs



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