projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Suppress GCC 4.7 warnings by changes to code that make it less clear.
[pspp]
/
src
/
language
/
dictionary
/
sys-file-info.c
diff --git
a/src/language/dictionary/sys-file-info.c
b/src/language/dictionary/sys-file-info.c
index 31a685aa824276afd1d38326140bf9cac530504d..441054e209b29b3dfdb7434038083dd6df11ce32 100644
(file)
--- a/
src/language/dictionary/sys-file-info.c
+++ b/
src/language/dictionary/sys-file-info.c
@@
-377,12
+377,15
@@
static void
display_attributes (struct tab_table *t, const struct attrset *set, int flags,
int c, int r)
{
display_attributes (struct tab_table *t, const struct attrset *set, int flags,
int c, int r)
{
- struct attrset_iterator i;
- struct attribute *attr;
+ struct attribute **attrs;
+ size_t n_attrs;
+ size_t i;
- for (attr = attrset_first (set, &i); attr != NULL;
- attr = attrset_next (set, &i))
+ n_attrs = attrset_count (set);
+ attrs = attrset_sorted (set);
+ for (i = 0; i < n_attrs; i++)
{
{
+ const struct attribute *attr = attrs[i];
const char *name = attribute_get_name (attr);
size_t n_values;
size_t i;
const char *name = attribute_get_name (attr);
size_t n_values;
size_t i;
@@
-401,6
+404,7
@@
display_attributes (struct tab_table *t, const struct attrset *set, int flags,
r++;
}
}
r++;
}
}
+ free (attrs);
}
static void
}
static void