From: John Darrington Date: Tue, 7 Jul 2009 05:19:18 +0000 (+0800) Subject: Fix compile warnings X-Git-Tag: build37~53^2~17 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=82217038368a953179398d9ecc7b80169a1b9ddc;p=pspp-builds.git Fix compile warnings --- diff --git a/src/ui/gui/helper.c b/src/ui/gui/helper.c index b4b3872d..4ec4bb0c 100644 --- a/src/ui/gui/helper.c +++ b/src/ui/gui/helper.c @@ -49,7 +49,7 @@ /* Formats a value according to FORMAT The returned string must be freed when no longer required */ gchar * -value_to_text (union value v, PsppireDict *dict, struct fmt_spec format) +value_to_text (union value v, const PsppireDict *dict, struct fmt_spec format) { gchar *s = 0; diff --git a/src/ui/gui/helper.h b/src/ui/gui/helper.h index 6706df20..2a7be4aa 100644 --- a/src/ui/gui/helper.h +++ b/src/ui/gui/helper.h @@ -34,7 +34,7 @@ struct fmt_spec; /* Formats a value according to FORMAT The returned string must be freed when no longer required */ -gchar * value_to_text (union value v, PsppireDict *dict, struct fmt_spec format); +gchar * value_to_text (union value v, const PsppireDict *dict, struct fmt_spec format); gboolean text_to_value (const gchar *text, union value *v, diff --git a/src/ui/gui/psppire-var-store.c b/src/ui/gui/psppire-var-store.c index 991fdf46..26c1ee4d 100644 --- a/src/ui/gui/psppire-var-store.c +++ b/src/ui/gui/psppire-var-store.c @@ -696,7 +696,7 @@ text_for_column (PsppireVarStore *vs, g_assert (vl); { - gchar *const vstr = value_to_text (vl->value, dict->dict, *write_spec); + gchar *const vstr = value_to_text (vl->value, dict, *write_spec); return g_strdup_printf ( "{%s,\"%s\"}_", vstr, val_lab_get_label (vl)); } diff --git a/src/ui/gui/var-display.c b/src/ui/gui/var-display.c index fcec1e8f..7081e9e2 100644 --- a/src/ui/gui/var-display.c +++ b/src/ui/gui/var-display.c @@ -45,7 +45,7 @@ missing_values_to_string (const PsppireDict *dict, const struct variable *pv, GE gint i; for (i = 0 ; i < n; ++i ) { - mv[i] = value_to_text (*mv_get_value (miss, i), dict->dict, *fmt); + mv[i] = value_to_text (*mv_get_value (miss, i), dict, *fmt); if ( i > 0 ) g_string_append (gstr, ", "); g_string_append (gstr, mv[i]); @@ -61,8 +61,8 @@ missing_values_to_string (const PsppireDict *dict, const struct variable *pv, GE union value low, high; mv_get_range (miss, &low.f, &high.f); - l = value_to_text (low, dict->dict, *fmt); - h = value_to_text (high, dict->dict,*fmt); + l = value_to_text (low, dict, *fmt); + h = value_to_text (high, dict,*fmt); g_string_printf (gstr, "%s - %s", l, h); g_free (l); @@ -72,7 +72,7 @@ missing_values_to_string (const PsppireDict *dict, const struct variable *pv, GE { gchar *ss = 0; - ss = value_to_text (*mv_get_value (miss, 0), dict->dict, *fmt); + ss = value_to_text (*mv_get_value (miss, 0), dict, *fmt); g_string_append (gstr, ", "); g_string_append (gstr, ss); diff --git a/src/ui/gui/variable-info-dialog.c b/src/ui/gui/variable-info-dialog.c index afa96615..178a834c 100644 --- a/src/ui/gui/variable-info-dialog.c +++ b/src/ui/gui/variable-info-dialog.c @@ -113,7 +113,7 @@ populate_text (PsppireDictView *treeview, gpointer data) { const struct val_lab *vl = labels[i]; gchar *const vstr = - value_to_text (vl->value, dict->dict, *var_get_print_format (var)); + value_to_text (vl->value, dict, *var_get_print_format (var)); g_string_append_printf (gstring, _("%s %s\n"), vstr, val_lab_get_label (vl));