From: John Darrington Date: Fri, 12 Dec 2008 13:13:20 +0000 (+0900) Subject: More runtime warnings fixed X-Git-Tag: v0.7.1~38 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=82a1c1132557cfec30525068d873f97f56dbcab0;p=pspp-builds.git More runtime warnings fixed --- diff --git a/lib/gtksheet/psppire-axis-impl.c b/lib/gtksheet/psppire-axis-impl.c index 1fb00d2d..38ade632 100644 --- a/lib/gtksheet/psppire-axis-impl.c +++ b/lib/gtksheet/psppire-axis-impl.c @@ -264,7 +264,8 @@ psppire_axis_impl_append_n (PsppireAxisImpl *a, gint n_units, gint size) { struct axis_node *node; - g_return_if_fail (n_units > 0); + if (n_units == 0) + return; node = pool_malloc (a->pool, sizeof *node); @@ -438,7 +439,7 @@ psppire_axis_impl_delete (PsppireAxisImpl *a, gint first, gint n_units) gint units_to_delete = n_units; unsigned long int start; struct tower_node *unit_node ; - g_return_if_fail (first + n_units < tower_height (&a->unit_tower)); + g_return_if_fail (first + n_units <= tower_height (&a->unit_tower)); split (a, first); split (a, first + n_units); diff --git a/src/ui/gui/psppire-data-store.c b/src/ui/gui/psppire-data-store.c index 2059d75a..e0402dea 100644 --- a/src/ui/gui/psppire-data-store.c +++ b/src/ui/gui/psppire-data-store.c @@ -662,7 +662,8 @@ psppire_data_store_set_string (PsppireDataStore *store, { glong n_cases; const struct variable *pv = psppire_dict_get_variable (store->dict, col); - g_return_val_if_fail (pv, FALSE); + if ( NULL == pv) + return FALSE; n_cases = psppire_data_store_get_case_count (store);