--- src/gnome-utils/gnc-dense-cal.c.orig	2014-09-22 15:01:30.000000000 -0700
+++ src/gnome-utils/gnc-dense-cal.c	2015-01-08 17:39:42.000000000 -0800
@@ -261,7 +261,7 @@
 static void
 gnc_dense_cal_init(GncDenseCal *dcal)
 {
-    gboolean colorAllocSuccess;
+    gboolean colorAllocSuccess[MAX_COLORS];
 
     gtk_widget_push_composite_child();
 
@@ -348,10 +348,14 @@
 
     gdk_color_parse(MONTH_THIS_COLOR,  &dcal->weekColors[MONTH_THIS]);
     gdk_color_parse(MONTH_THAT_COLOR,  &dcal->weekColors[MONTH_THAT]);
+
+    /* success array must be as big as number of colors */
+    g_assert(MAX_COLORS == (sizeof(colorAllocSuccess)/sizeof(gboolean)));
+
     if (gdk_colormap_alloc_colors(gdk_colormap_get_system(),
                                   dcal->weekColors,
                                   MAX_COLORS, TRUE, TRUE,
-                                  &colorAllocSuccess) > 0)
+                                  colorAllocSuccess) > 0)
     {
         g_error("error allocating colors");
     }
