[gjs] arg.c: Fix compiler warning



commit 1959ac00cb9ffe9dad514ba1bb4d0300c1fcdb49
Author: Colin Walters <walters verbum org>
Date:   Wed Sep 1 15:57:03 2010 -0400

    arg.c: Fix compiler warning
    
    Funny GCC doesn't warn about this at -O0...

 gi/arg.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gi/arg.c b/gi/arg.c
index 64212ca..ea587e9 100644
--- a/gi/arg.c
+++ b/gi/arg.c
@@ -111,10 +111,10 @@ replace_gtype(GITypeTag type) {
     if (type == GI_TYPE_TAG_GTYPE) {
         /* Constant folding should handle this hopefully */
         switch (sizeof(GType)) {
-        case 1: GI_TYPE_TAG_UINT8;
-        case 2: GI_TYPE_TAG_UINT16;
-        case 4: GI_TYPE_TAG_UINT32;
-        case 8: GI_TYPE_TAG_UINT64;
+        case 1: return GI_TYPE_TAG_UINT8;
+        case 2: return GI_TYPE_TAG_UINT16;
+        case 4: return GI_TYPE_TAG_UINT32;
+        case 8: return GI_TYPE_TAG_UINT64;
         default: g_assert_not_reached ();
         }
     }



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