Commit 47587b3e authored by Morten Welinder's avatar Morten Welinder Committed by Morten Welinder

Debug default cases. (do_gnm_expr_unref): Ditto.

2002-10-24  Morten Welinder  <terra@diku.dk>

	* src/expr.c (gnm_expr_eval): Debug default cases.
	(do_gnm_expr_unref): Ditto.

	* src/dependent.c (unlink_expr_dep): Ditto.
	* src/summary.c: Ditto.
	* src/mstyle.c (mstyle_hash): Ditto.
	(summary_item_free): Ditto.
	(summary_item_as_text): Ditto.
	(summary_item_copy): Ditto.
parent 42a6f081
2002-10-24 Morten Welinder <terra@diku.dk>
* src/expr.c (gnm_expr_eval): Debug default cases.
(do_gnm_expr_unref): Ditto.
* src/dependent.c (unlink_expr_dep): Ditto.
* src/summary.c: Ditto.
* src/mstyle.c (mstyle_hash): Ditto.
(summary_item_free): Ditto.
(summary_item_as_text): Ditto.
(summary_item_copy): Ditto.
2002-10-23 Jody Goldberg <jody@gnome.org>
* src/xml-io.c : disable GNM_EXPR_PARSE_UNKNOWN_NAMES_ARE_STRINGS
......
2002-10-24 Morten Welinder <terra@diku.dk>
* src/expr.c (gnm_expr_eval): Debug default cases.
(do_gnm_expr_unref): Ditto.
* src/dependent.c (unlink_expr_dep): Ditto.
* src/summary.c: Ditto.
* src/mstyle.c (mstyle_hash): Ditto.
(summary_item_free): Ditto.
(summary_item_as_text): Ditto.
(summary_item_copy): Ditto.
2002-10-23 Jody Goldberg <jody@gnome.org>
* src/xml-io.c : disable GNM_EXPR_PARSE_UNKNOWN_NAMES_ARE_STRINGS
......
2002-10-24 Morten Welinder <terra@diku.dk>
* src/expr.c (gnm_expr_eval): Debug default cases.
(do_gnm_expr_unref): Ditto.
* src/dependent.c (unlink_expr_dep): Ditto.
* src/summary.c: Ditto.
* src/mstyle.c (mstyle_hash): Ditto.
(summary_item_free): Ditto.
(summary_item_as_text): Ditto.
(summary_item_copy): Ditto.
2002-10-23 Jody Goldberg <jody@gnome.org>
* src/xml-io.c : disable GNM_EXPR_PARSE_UNKNOWN_NAMES_ARE_STRINGS
......
......@@ -804,8 +804,10 @@ link_expr_dep (Dependent *dep, CellPos const *pos, GnmExpr const *tree)
case GNM_EXPR_OP_INTERSECT:
return DEPENDENT_NO_FLAG; /* handled at run time */
#ifndef DEBUG_SWITCH_ENUM
default:
g_warning ("Unknown Operation type, dependencies lost");
g_assert_not_reached ();
#endif
}
return 0;
}
......@@ -888,9 +890,11 @@ unlink_expr_dep (Dependent *dep, CellPos const *pos, GnmExpr const *tree)
case GNM_EXPR_OP_INTERSECT:
return;
#ifndef DEBUG_SWITCH_ENUM
default:
g_warning ("Unknown Operation type, dependencies lost");
g_assert_not_reached ();
break;
#endif
}
}
......
......@@ -381,9 +381,12 @@ do_gnm_expr_unref (GnmExpr const *expr)
case GNM_EXPR_OP_SET:
gnm_expr_list_unref (expr->set.set);
break;
#ifndef DEBUG_SWITCH_ENUM
default:
g_warning ("do_gnm_expr_unref error.");
g_assert_not_reached ();
break;
#endif
}
CHUNK_FREE (expression_pool, (gpointer)expr);
......@@ -742,10 +745,12 @@ gnm_expr_eval (GnmExpr const *expr, EvalPos const *pos,
res = value_new_bool (comp != IS_LESS);
break;
#ifndef DEBUG_SWITCH_ENUM
default:
g_assert_not_reached ();
res = value_new_error (pos,
_("Internal type error"));
#endif
}
return res;
}
......
......@@ -205,9 +205,12 @@ mstyle_hash (gconstpointer st)
case MSTYLE_FONT_UNDERLINE:
hash = hash ^ e->u.font.underline;
break;
#ifndef DEBUG_SWITCH_ENUM
default:
g_warning ("Unimplemented hash item");
g_assert_not_reached ();
break;
#endif
}
}
......
......@@ -142,8 +142,11 @@ summary_item_as_text (SummaryItem const *sit)
ch_time[strlen (ch_time) - 1] = '\0';
return g_strdup (ch_time);
#ifndef DEBUG_SWITCH_ENUM
default:
g_assert_not_reached ();
return g_strdup ("Unhandled type");
#endif
}
}
......@@ -164,9 +167,12 @@ summary_item_free (SummaryItem *sit)
case SUMMARY_INT:
case SUMMARY_TIME:
break;
#ifndef DEBUG_SWITCH_ENUM
default:
g_warning ("unknown / unimplemented summary type");
g_assert_not_reached ();
break;
#endif
}
g_free (sit->name);
g_free (sit);
......@@ -356,9 +362,11 @@ summary_item_copy (SummaryItem const *sit)
case SUMMARY_TIME:
return summary_item_new_time (sit->name, sit->v.time);
#ifndef DEBUG_SWITCH_ENUM
default:
g_warning ("Unknown summary type encountered.");
g_assert_not_reached ();
return NULL;
#endif
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment