mirror of
https://git.savannah.gnu.org/git/gperf.git
synced 2025-12-02 13:09:22 +00:00
Fix uninitialized variable bug.
This commit is contained in:
@@ -1,5 +1,9 @@
|
|||||||
2002-11-02 Bruno Haible <bruno@clisp.org>
|
2002-11-02 Bruno Haible <bruno@clisp.org>
|
||||||
|
|
||||||
|
Bug fix.
|
||||||
|
* src/keyword.cc (KeywordExt::init_selchars): Avoid comparison with
|
||||||
|
uninitialized member variable. Found with 'valgrind'.
|
||||||
|
|
||||||
* src/version.cc: Include version.h.
|
* src/version.cc: Include version.h.
|
||||||
* src/Makefile.in (OBJECTS): Reorder.
|
* src/Makefile.in (OBJECTS): Reorder.
|
||||||
(KEYWORD_H, KEYWORD_LIST_H, INPUT_H, SEARCH_H, OUTPUT_H): New
|
(KEYWORD_H, KEYWORD_LIST_H, INPUT_H, SEARCH_H, OUTPUT_H): New
|
||||||
|
|||||||
@@ -97,8 +97,8 @@ void KeywordExt::init_selchars (int *occurrences)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Didn't get any hits and user doesn't want to consider the
|
/* Didn't get any hits and user doesn't want to consider the
|
||||||
keylength, so there are essentially no usable hash positions! */
|
keylength, so there are essentially no usable hash positions! */
|
||||||
if (ptr == _selchars && option[NOLENGTH])
|
if (ptr == key_set && option[NOLENGTH])
|
||||||
{
|
{
|
||||||
fprintf (stderr, "Can't hash keyword %.*s with chosen key positions.\n",
|
fprintf (stderr, "Can't hash keyword %.*s with chosen key positions.\n",
|
||||||
_allchars_length, _allchars);
|
_allchars_length, _allchars);
|
||||||
|
|||||||
Reference in New Issue
Block a user