Revert intermediate file free code.
Suppress some warnings in VMS builds.
+2006-02-20 Paul D. Smith <psmith@gnu.org>
+
+ * variable.c (merge_variable_set_lists): It's legal for *setlist0
+ to be null; don't core in that case.
+
2006-02-19 Paul D. Smith <psmith@gnu.org>
* commands.c (set_file_variables): Realloc, not malloc, the static
free_idep_chain (struct idep *p)
{
struct idep *n;
- struct file *f;
for (; p != 0; p = n)
{
n = p->next;
if (p->name)
- free (p->name);
+ {
+ struct file *f = p->intermediate_file;
+
+ if (f != 0
+ && (f->stem < f->name || f->stem > f->name + strlen (f->name)))
+ free (f->stem);
- f = p->intermediate_file;
- if (f != 0
- && (f->stem < f->name || f->stem > f->name + strlen (f->name)))
- free (f->stem);
+ free (p->name);
+ }
free (p);
}
f->deps = imf->deps;
f->cmds = imf->cmds;
- f->stem = xstrdup (imf->stem);
+ f->stem = imf->stem;
f->also_make = imf->also_make;
f->is_target = 1;
#
ifeq ($(CC),cc)
-CFLAGS = $(defines) /include=([],[.glob])/prefix=(all,except=(glob,globfree))/standard=relaxed
+CFLAGS = $(defines) /include=([],[.glob])/prefix=(all,except=(glob,globfree))/standard=relaxed/warn=(disable=questcompare)
else
CFLAGS = $(defines) /include=([],[.glob])
endif
/* This loop relies on the fact that all setlists terminate with the global
setlist (before NULL). If that's not true, arguably we SHOULD die. */
- while (setlist1 != &global_setlist && to != &global_setlist)
- {
- struct variable_set_list *from = setlist1;
- setlist1 = setlist1->next;
+ if (to)
+ while (setlist1 != &global_setlist && to != &global_setlist)
+ {
+ struct variable_set_list *from = setlist1;
+ setlist1 = setlist1->next;
- merge_variable_sets (to->set, from->set);
+ merge_variable_sets (to->set, from->set);
- last0 = to;
- to = to->next;
- }
+ last0 = to;
+ to = to->next;
+ }
if (setlist1 != &global_setlist)
{