mirror of
https://git.savannah.gnu.org/git/gperf.git
synced 2025-12-02 13:09:22 +00:00
Avoid gcc warnings about uninitialized variables.
This commit is contained in:
@@ -1,5 +1,8 @@
|
|||||||
2002-11-20 Bruno Haible <bruno@clisp.org>
|
2002-11-20 Bruno Haible <bruno@clisp.org>
|
||||||
|
|
||||||
|
* src/search.cc (Search::find_asso_values): Avoid gcc warnings about
|
||||||
|
uninitialized variables.
|
||||||
|
|
||||||
Implement backtracking.
|
Implement backtracking.
|
||||||
* src/search.h (Search::has_collisions): Renamed from
|
* src/search.h (Search::has_collisions): Renamed from
|
||||||
Search::less_collisions. Return a boolean.
|
Search::less_collisions. Return a boolean.
|
||||||
|
|||||||
@@ -1091,7 +1091,7 @@ Search::find_asso_values ()
|
|||||||
union_index + 1, _asso_values[c]);
|
union_index + 1, _asso_values[c]);
|
||||||
fflush (stderr);
|
fflush (stderr);
|
||||||
}
|
}
|
||||||
goto RECURSE;
|
goto RECURSE_COLLISION;
|
||||||
BACKTRACK_COLLISION: ;
|
BACKTRACK_COLLISION: ;
|
||||||
if (option[DEBUG])
|
if (option[DEBUG])
|
||||||
{
|
{
|
||||||
@@ -1133,16 +1133,15 @@ Search::find_asso_values ()
|
|||||||
sp--;
|
sp--;
|
||||||
curr = sp->_curr;
|
curr = sp->_curr;
|
||||||
prior = sp->_prior;
|
prior = sp->_prior;
|
||||||
|
if (prior == NULL)
|
||||||
|
goto BACKTRACK_NO_COLLISION;
|
||||||
union_set = sp->_union_set;
|
union_set = sp->_union_set;
|
||||||
union_set_length = sp->_union_set_length;
|
union_set_length = sp->_union_set_length;
|
||||||
union_index = sp->_union_index;
|
union_index = sp->_union_index;
|
||||||
c = sp->_c;
|
c = sp->_c;
|
||||||
original_asso_value = sp->_original_asso_value;
|
original_asso_value = sp->_original_asso_value;
|
||||||
iter = sp->_iter;
|
iter = sp->_iter;
|
||||||
if (prior != NULL)
|
goto BACKTRACK_COLLISION;
|
||||||
goto BACKTRACK_COLLISION;
|
|
||||||
else
|
|
||||||
goto BACKTRACK_NO_COLLISION;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* No solution found after an exhaustive search!
|
/* No solution found after an exhaustive search!
|
||||||
@@ -1156,15 +1155,17 @@ Search::find_asso_values ()
|
|||||||
fprintf (stderr, "try options -m or -r.\n\n");
|
fprintf (stderr, "try options -m or -r.\n\n");
|
||||||
exit (1);
|
exit (1);
|
||||||
}
|
}
|
||||||
RECURSE:
|
goto RECURSE_NO_COLLISION;
|
||||||
/*sp->_curr = curr;*/ // redundant
|
RECURSE_COLLISION:
|
||||||
sp->_prior = prior;
|
|
||||||
/*sp->_union_set = union_set;*/ // redundant
|
/*sp->_union_set = union_set;*/ // redundant
|
||||||
sp->_union_set_length = union_set_length;
|
sp->_union_set_length = union_set_length;
|
||||||
sp->_union_index = union_index;
|
sp->_union_index = union_index;
|
||||||
sp->_c = c;
|
sp->_c = c;
|
||||||
sp->_original_asso_value = original_asso_value;
|
sp->_original_asso_value = original_asso_value;
|
||||||
sp->_iter = iter;
|
sp->_iter = iter;
|
||||||
|
RECURSE_NO_COLLISION:
|
||||||
|
/*sp->_curr = curr;*/ // redundant
|
||||||
|
sp->_prior = prior;
|
||||||
sp++;
|
sp++;
|
||||||
if (sp - stack < _list_len)
|
if (sp - stack < _list_len)
|
||||||
goto STARTOUTERLOOP;
|
goto STARTOUTERLOOP;
|
||||||
|
|||||||
Reference in New Issue
Block a user