[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[datasets 03/18] gui: Fix const-ness warning for measure_to_string() ret
From: |
Ben Pfaff |
Subject: |
[datasets 03/18] gui: Fix const-ness warning for measure_to_string() return type. |
Date: |
Sat, 30 Apr 2011 22:36:31 -0700 |
This fixes the following GCC warning:
src/ui/gui/var-display.c: In function ‘measure_to_string’:
rc/ui/gui/var-display.c:25: warning: return discards qualifiers from
pointer target type
---
src/ui/gui/var-display.c | 2 +-
src/ui/gui/var-display.h | 4 ++--
src/ui/gui/variable-info-dialog.c | 3 +--
3 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/ui/gui/var-display.c b/src/ui/gui/var-display.c
index 1b9bf71..26de981 100644
--- a/src/ui/gui/var-display.c
+++ b/src/ui/gui/var-display.c
@@ -16,7 +16,7 @@
static const gchar none[] = N_("None");
-gchar *
+const gchar *
measure_to_string (const struct variable *var, GError **err)
{
const gint measure = var_get_measure (var);
diff --git a/src/ui/gui/var-display.h b/src/ui/gui/var-display.h
index 927e235..62212c8 100644
--- a/src/ui/gui/var-display.h
+++ b/src/ui/gui/var-display.h
@@ -1,5 +1,5 @@
/* PSPPIRE - a graphical user interface for PSPP.
- Copyright (C) 2007 Free Software Foundation
+ Copyright (C) 2007, 2011 Free Software Foundation
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -30,6 +30,6 @@ extern const gchar *const alignments[n_ALIGNMENTS + 1];
extern const gchar *const measures[n_MEASURES + 1];
gchar *missing_values_to_string (const PsppireDict *dict, const struct
variable *pv, GError **err);
-gchar *measure_to_string (const struct variable *var, GError **err);
+const gchar *measure_to_string (const struct variable *var, GError **err);
#endif
diff --git a/src/ui/gui/variable-info-dialog.c
b/src/ui/gui/variable-info-dialog.c
index 088083f..37f501a 100644
--- a/src/ui/gui/variable-info-dialog.c
+++ b/src/ui/gui/variable-info-dialog.c
@@ -89,9 +89,8 @@ populate_text (PsppireDictView *treeview, gpointer data)
text);
g_free (text);
- text = measure_to_string (var, NULL);
g_string_append_printf (gstring, _("Measurement Level: %s\n"),
- text);
+ measure_to_string (var, NULL));
/* Value Labels */
--
1.7.2.5
- [datasets 17/18] gui: Add ellipsis to menu items that require further input., (continued)
- [datasets 07/18] psppire-window: Use g_string_append_unichar() instead of global var., Ben Pfaff, 2011/05/01
- [datasets 08/18] gui: Include only <gtk/gtk.h> to use GTK+., Ben Pfaff, 2011/05/01
- [datasets 01/18] gui: Always convert file names to UTF-8 for use in syntax., Ben Pfaff, 2011/05/01
- [datasets 14/18] gui: Fix g_object_get() memory leaks for PsppireWindow's filename., Ben Pfaff, 2011/05/01
- [datasets 03/18] gui: Fix const-ness warning for measure_to_string() return type.,
Ben Pfaff <=
- [datasets 16/18] Implement DATASET commands., Ben Pfaff, 2011/05/01
- [datasets 10/18] gui: Prefer NULL to 0 for initializing pointers., Ben Pfaff, 2011/05/01
- [datasets 18/18] gui: Change View|Data and View|Variables to radio button menu items., Ben Pfaff, 2011/05/01
- [datasets 15/18] gui: New "entry-dialog" module for prompting for a text string., Ben Pfaff, 2011/05/01