projects
/
pspp-builds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
(binary_search): Fix assertion.
[pspp-builds.git]
/
src
/
language
/
dictionary
/
modify-variables.c
diff --git
a/src/language/dictionary/modify-variables.c
b/src/language/dictionary/modify-variables.c
index c74cd529afe2b31f0fab2872365f1b006b2ff568..f3a18325818dae9c8f2c4c65ae67671c8957ad2d 100644
(file)
--- a/
src/language/dictionary/modify-variables.c
+++ b/
src/language/dictionary/modify-variables.c
@@
-141,7
+141,7
@@
cmd_modify_vars (struct lexer *lexer, struct dataset *ds)
"of variables."));
goto done;
}
"of variables."));
goto done;
}
- dict_get_vars (dataset_dict (ds), &v, &nv, 1u << DC_SYSTEM);
+ dict_get_vars
_mutable
(dataset_dict (ds), &v, &nv, 1u << DC_SYSTEM);
}
else
{
}
else
{
@@
-210,7
+210,8
@@
cmd_modify_vars (struct lexer *lexer, struct dataset *ds)
{
msg (SE, _("Differing number of variables in old name list "
"(%d) and in new name list (%d)."),
{
msg (SE, _("Differing number of variables in old name list "
"(%d) and in new name list (%d)."),
- vm.rename_cnt - prev_nv_2, prev_nv_1 - prev_nv_2);
+ (int) (vm.rename_cnt - prev_nv_2),
+ (int) (prev_nv_1 - prev_nv_2));
for (i = 0; i < prev_nv_1; i++)
free (vm.new_names[i]);
free (vm.new_names);
for (i = 0; i < prev_nv_1; i++)
free (vm.new_names[i]);
free (vm.new_names);
@@
-249,7
+250,7
@@
cmd_modify_vars (struct lexer *lexer, struct dataset *ds)
sort (keep_vars, keep_cnt, sizeof *keep_vars,
compare_variables_given_ordering, &forward_positional_ordering);
sort (keep_vars, keep_cnt, sizeof *keep_vars,
compare_variables_given_ordering, &forward_positional_ordering);
- dict_get_vars (dataset_dict (ds), &all_vars, &all_cnt, 0);
+ dict_get_vars
_mutable
(dataset_dict (ds), &all_vars, &all_cnt, 0);
assert (all_cnt >= keep_cnt);
drop_cnt = all_cnt - keep_cnt;
assert (all_cnt >= keep_cnt);
drop_cnt = all_cnt - keep_cnt;
@@
-407,7
+408,7
@@
validate_var_modification (const struct dictionary *d,
size_t i;
/* All variables, in index order. */
size_t i;
/* All variables, in index order. */
- dict_get_vars (d, &all_vars, &all_cnt, 0);
+ dict_get_vars
_mutable
(d, &all_vars, &all_cnt, 0);
/* Drop variables, in index order. */
drop_cnt = vm->drop_cnt;
/* Drop variables, in index order. */
drop_cnt = vm->drop_cnt;