From 09f985912144ac86ec48edcce42da390ce2b85b9 Mon Sep 17 00:00:00 2001 From: John Darrington Date: Sun, 7 May 2006 10:11:51 +0000 Subject: [PATCH] Fixed a number of warnings. --- lib/gtksheet/gsheet-hetero-column.c | 8 +------- lib/gtksheet/gsheet-uniform-row.c | 2 -- po/pspp.pot | 6 +++--- src/data/sys-file-reader.c | 4 ++-- src/libpspp/array.c | 2 +- src/libpspp/array.h | 2 +- src/ui/gui/psppire-data-store.c | 4 ++-- src/ui/gui/psppire-var-store.c | 11 ++++++----- src/ui/gui/var-type-dialog.c | 1 + 9 files changed, 17 insertions(+), 23 deletions(-) diff --git a/lib/gtksheet/gsheet-hetero-column.c b/lib/gtksheet/gsheet-hetero-column.c index 575fdc8a..e4235656 100644 --- a/lib/gtksheet/gsheet-hetero-column.c +++ b/lib/gtksheet/gsheet-hetero-column.c @@ -116,8 +116,6 @@ g_sheet_hetero_column_get_width(const GSheetColumn *geom, gint i) static gint g_sheet_hetero_column_get_sensitivity(const GSheetColumn *geom, gint u) { - GSheetHeteroColumn *hg = G_SHEET_HETERO_COLUMN(geom); - return TRUE; } @@ -125,8 +123,6 @@ g_sheet_hetero_column_get_sensitivity(const GSheetColumn *geom, gint u) static gint g_sheet_hetero_column_get_visibility(const GSheetColumn *geom, gint u) { - GSheetHeteroColumn *hg = G_SHEET_HETERO_COLUMN(geom); - return TRUE; } @@ -136,7 +132,7 @@ static const gchar * g_sheet_hetero_column_get_button_label(const GSheetColumn *geom, gint u) { GSheetHeteroColumn *hg = G_SHEET_HETERO_COLUMN(geom); - + return hg->col[u].button.label; } @@ -144,8 +140,6 @@ g_sheet_hetero_column_get_button_label(const GSheetColumn *geom, gint u) static GtkJustification g_sheet_hetero_column_get_justification(const GSheetColumn *geom, gint u) { - GSheetHeteroColumn *hg = G_SHEET_HETERO_COLUMN(geom); - return GTK_JUSTIFY_FILL; } diff --git a/lib/gtksheet/gsheet-uniform-row.c b/lib/gtksheet/gsheet-uniform-row.c index 48dd38a3..6ab1c8ff 100644 --- a/lib/gtksheet/gsheet-uniform-row.c +++ b/lib/gtksheet/gsheet-uniform-row.c @@ -123,8 +123,6 @@ g_sheet_uniform_row_get_visibility(const GSheetRow *geom, gint u) static const gchar * g_sheet_uniform_row_get_button_label(const GSheetRow *geom, gint u) { - GSheetUniformRow *ug = G_SHEET_UNIFORM_ROW(geom); - static gchar *label; g_free(label); label = g_strdup_printf("%d", u); diff --git a/po/pspp.pot b/po/pspp.pot index a9404b41..95598df4 100644 --- a/po/pspp.pot +++ b/po/pspp.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: pspp-dev@gnu.org\n" -"POT-Creation-Date: 2006-05-07 09:52+0800\n" +"POT-Creation-Date: 2006-05-07 12:07+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -1755,13 +1755,13 @@ msgstr "" msgid "Cannot add value labels from source file to long string variable %s." msgstr "" -#: src/language/dictionary/apply-dictionary.c:135 +#: src/language/dictionary/apply-dictionary.c:104 #, c-format msgid "" "Cannot apply missing values from source file to long string variable %s." msgstr "" -#: src/language/dictionary/apply-dictionary.c:155 +#: src/language/dictionary/apply-dictionary.c:124 msgid "No matching variables found between the source and target files." msgstr "" diff --git a/src/data/sys-file-reader.c b/src/data/sys-file-reader.c index 0a040af6..89a236d5 100644 --- a/src/data/sys-file-reader.c +++ b/src/data/sys-file-reader.c @@ -66,7 +66,7 @@ struct sfm_reader /* Variables. */ struct hsh_table *var_hash; - struct variable *const *svars; + struct variable **svars; /* File's special constants. */ flt64 sysmis; @@ -1693,7 +1693,7 @@ sfm_read_case (struct sfm_reader *r, struct ccase *c) if ( ! r->svars ) { - r->svars = (struct variable *const *) hsh_data(r->var_hash); + r->svars = (struct variable **) hsh_data(r->var_hash); sort(r->svars, hsh_count(r->var_hash), sizeof(*r->svars), compare_var_index, 0); } diff --git a/src/libpspp/array.c b/src/libpspp/array.c index 3d834ff5..945874cf 100644 --- a/src/libpspp/array.c +++ b/src/libpspp/array.c @@ -595,7 +595,7 @@ typedef struct stack size is needed (actually O(1) in this case)! */ void -sort (const void *array, size_t count, size_t size, +sort (void *array, size_t count, size_t size, algo_compare_func *compare, void *aux) { char *const first = array; diff --git a/src/libpspp/array.h b/src/libpspp/array.h index bc27aa81..10e589a1 100644 --- a/src/libpspp/array.h +++ b/src/libpspp/array.h @@ -45,7 +45,7 @@ size_t count_if (const void *array, size_t count, size_t size, /* Sorts ARRAY, which contains COUNT elements of SIZE bytes each, using COMPARE for comparisons. AUX is passed to each comparison as auxiliary data. */ -void sort (const void *array, size_t count, size_t size, +void sort (void *array, size_t count, size_t size, algo_compare_func *compare, void *aux); /* Tests whether ARRAY, which contains COUNT elements of SIZE diff --git a/src/ui/gui/psppire-data-store.c b/src/ui/gui/psppire-data-store.c index 7aa0ff33..cdd000b3 100644 --- a/src/ui/gui/psppire-data-store.c +++ b/src/ui/gui/psppire-data-store.c @@ -48,7 +48,7 @@ static void psppire_data_store_sheet_model_init (GSheetModelIface *iface); static void psppire_data_store_sheet_column_init (GSheetColumnIface *iface); static void psppire_data_store_finalize (GObject *object); -static const gchar *const psppire_data_store_get_string(GSheetModel *sheet_model, gint row, gint column); +static const gchar *psppire_data_store_get_string(GSheetModel *sheet_model, gint row, gint column); static gboolean psppire_data_store_set_string(GSheetModel *model, const gchar *text, gint row, gint column); @@ -326,7 +326,7 @@ psppire_data_store_finalize (GObject *object) } -static const gchar *const +static const gchar * psppire_data_store_get_string(GSheetModel *model, gint row, gint column) { diff --git a/src/ui/gui/psppire-var-store.c b/src/ui/gui/psppire-var-store.c index 1aefb8f9..97695a13 100644 --- a/src/ui/gui/psppire-var-store.c +++ b/src/ui/gui/psppire-var-store.c @@ -30,6 +30,7 @@ #include "psppire-variable.h" #include "psppire-var-store.h" #include "var-sheet.h" +#include "helper.h" #include #include @@ -48,7 +49,7 @@ static void psppire_var_store_class_init (PsppireVarStoreClass *cla static void psppire_var_store_sheet_model_init (GSheetModelIface *iface); static void psppire_var_store_finalize (GObject *object); -static const gchar *const psppire_var_store_get_string(GSheetModel *sheet_model, gint row, gint column); +static const gchar *psppire_var_store_get_string(GSheetModel *sheet_model, gint row, gint column); static gboolean psppire_var_store_clear(GSheetModel *model, gint row, gint col); @@ -57,7 +58,7 @@ static gboolean psppire_var_store_set_string(GSheetModel *model, const gchar *text, gint row, gint column); -static const gchar *const text_for_column(const struct PsppireVariable *pv, gint c); +static const gchar *text_for_column(const struct PsppireVariable *pv, gint c); static GObjectClass *parent_class = NULL; @@ -295,7 +296,7 @@ psppire_var_store_finalize (GObject *object) (* parent_class->finalize) (object); } -static const gchar *const +static const gchar * psppire_var_store_get_string(GSheetModel *model, gint row, gint column) { const gchar *s ; @@ -311,7 +312,7 @@ psppire_var_store_get_string(GSheetModel *model, gint row, gint column) s = text_for_column(pv, column); - return s; + return g_locale_to_utf8(s, -1, 0,0,0); } @@ -416,7 +417,7 @@ psppire_var_store_set_string(GSheetModel *model, #define MAX_CELL_TEXT_LEN 255 -static const gchar *const +static const gchar * text_for_column(const struct PsppireVariable *pv, gint c) { static gchar buf[MAX_CELL_TEXT_LEN]; diff --git a/src/ui/gui/var-type-dialog.c b/src/ui/gui/var-type-dialog.c index 12583f57..65812f27 100644 --- a/src/ui/gui/var-type-dialog.c +++ b/src/ui/gui/var-type-dialog.c @@ -31,6 +31,7 @@ #include "var-type-dialog.h" #include "psppire-variable.h" +#include "helper.h" #include #include -- 2.30.2