1
0
mirror of https://git.savannah.gnu.org/git/gperf.git synced 2025-12-02 13:09:22 +00:00

Avoid outputting initializers of the form {"key",} which cause compiler

warnings.
This commit is contained in:
Bruno Haible
2000-08-19 10:46:16 +00:00
parent a65ffb4dec
commit ab051c5b60
2 changed files with 8 additions and 1 deletions

View File

@@ -1,5 +1,8 @@
2000-08-19 Bruno Haible <bruno@linuix.math.u-bordeaux.fr>
* src/key-list.cc (output_keyword_entry): Avoid outputting a struct
initializer of the form {"key",}.
* src/iterator.cc: Don't include <stream.h>.
From Michael Deutschmann <ldeutsch@mail.netshop.net>.

View File

@@ -1044,7 +1044,11 @@ output_keyword_entry (List_Node *temp, const char *indent)
printf ("{");
output_string (temp->key);
if (option[TYPE])
printf (",%s}", temp->rest);
{
if (strlen (temp->rest) > 0)
printf (",%s", temp->rest);
printf ("}");
}
if (option[DEBUG])
printf (" /* hash value = %d, index = %d */",
temp->hash_value, temp->index);