mirror of git://gcc.gnu.org/git/gcc.git
* cppinit.c (remove_dup_nonsys_dirs): Fix warning and return value.
From-SVN: r56493
This commit is contained in:
parent
b462d4abc6
commit
d873d82743
|
|
@ -1,3 +1,7 @@
|
|||
2002-08-21 John David Anglin <dave@hiauly1.hia.nrc.ca>
|
||||
|
||||
* cppinit.c (remove_dup_nonsys_dirs): Fix warning and return value.
|
||||
|
||||
2002-08-21 Joseph S. Myers <jsm@polyomino.org.uk>
|
||||
|
||||
* c-decl.c (grokdeclarator): Make invalid combinations with long,
|
||||
|
|
|
|||
|
|
@ -303,12 +303,14 @@ remove_dup_nonsys_dirs (pfile, head_ptr, end)
|
|||
struct search_path **head_ptr;
|
||||
struct search_path *end;
|
||||
{
|
||||
struct search_path *prev, *cur, *other;
|
||||
int sysdir = 0;
|
||||
struct search_path *prev = NULL, *cur, *other;
|
||||
|
||||
for (cur = *head_ptr; cur; cur = cur->next)
|
||||
{
|
||||
if (cur->sysp)
|
||||
{
|
||||
sysdir = 1;
|
||||
for (other = *head_ptr, prev = NULL;
|
||||
other != end;
|
||||
other = other ? other->next : *head_ptr)
|
||||
|
|
@ -327,6 +329,10 @@ remove_dup_nonsys_dirs (pfile, head_ptr, end)
|
|||
}
|
||||
}
|
||||
|
||||
if (!sysdir)
|
||||
for (cur = *head_ptr; cur != end; cur = cur->next)
|
||||
prev = cur;
|
||||
|
||||
return prev;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue