new enum values need to be handled in switches
authorDana Jansens <danakj@orodu.net>
Mon, 17 May 2010 22:39:55 +0000 (18:39 -0400)
committerDana Jansens <danakj@orodu.net>
Mon, 17 May 2010 23:31:21 +0000 (19:31 -0400)
(the new enum values were added to count the number of entries in the enums)

obrender/font.c
obrender/render.c

index 892b2c1..a22e23f 100644 (file)
@@ -284,6 +284,8 @@ void RrFontDraw(XftDraw *d, RrTextureText *t, RrRect *area)
     case RR_JUSTIFY_CENTER:
         x += (w - mw) / 2;
         break;
+    case RR_JUSTIFY_NUM_TYPES:
+        g_assert_not_reached();
     }
 
     if (t->shadow_offset_x || t->shadow_offset_y) {
index 58bf12e..fb59e21 100644 (file)
@@ -170,6 +170,8 @@ Pixmap RrPaintPixmap(RrAppearance *a, gint w, gint h)
             }
             force_transfer = 1;
         break;
+        case RR_TEXTURE_NUM_TYPES:
+            g_assert_not_reached();
         }
     }
 
@@ -377,6 +379,8 @@ void RrMargins (RrAppearance *a, gint *l, gint *t, gint *r, gint *b)
             case RR_BEVEL_2:
                 *l = *t = *r = *b = 2;
                 break;
+            case RR_BEVEL_NUM_TYPES:
+                g_assert_not_reached();
             }
         } else if (a->surface.border) {
             *l = *t = *r = *b = 1;
@@ -426,6 +430,8 @@ gint RrMinWidth(RrAppearance *a)
             w = MAX(w, MAX(a->texture[i].data.lineart.x1 - l - r,
                            a->texture[i].data.lineart.x2 - l - r));
             break;
+        case RR_TEXTURE_NUM_TYPES:
+            g_assert_not_reached();
         }
     }
 
@@ -481,6 +487,8 @@ gint RrMinHeight(RrAppearance *a)
             h = MAX(h, MAX(a->texture[i].data.lineart.y1 - t - b,
                            a->texture[i].data.lineart.y2 - t - b));
             break;
+        case RR_TEXTURE_NUM_TYPES:
+            g_assert_not_reached();
         }
     }