mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-12 22:03:02 +00:00
Clean up GCC warnings.
* src/reader.c (copy_action): `buf' is not used. (parse_skel_decl): Be static. * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'. * src/options.h (create_long_option_table): Have a real prototype. * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete) (hash_delete_at): Return const void *. Adjust casts to preserve the const.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/* Macro table manager for Bison,
|
||||
Copyright 1984, 1989, 2000 Free Software Foundation, Inc.
|
||||
Copyright 2001 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
|
||||
@@ -32,19 +32,20 @@ struct hash_table muscle_table;
|
||||
static unsigned long
|
||||
mhash1 (const void *item)
|
||||
{
|
||||
return_STRING_HASH_1 (((muscle_entry_t *) item)->key);
|
||||
return_STRING_HASH_1 (((const muscle_entry_t *) item)->key);
|
||||
}
|
||||
|
||||
static unsigned long
|
||||
mhash2 (const void *item)
|
||||
{
|
||||
return_STRING_HASH_2 (((muscle_entry_t *) item)->key);
|
||||
return_STRING_HASH_2 (((const muscle_entry_t *) item)->key);
|
||||
}
|
||||
|
||||
static int
|
||||
mcmp (const void *x, const void *y)
|
||||
{
|
||||
return strcmp (((muscle_entry_t*) x)->key, ((muscle_entry_t *) y)->key);
|
||||
return strcmp (((const muscle_entry_t*) x)->key,
|
||||
((const muscle_entry_t *) y)->key);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -105,7 +106,7 @@ muscle_init (void)
|
||||
muscle_insert ("name", "Parser");
|
||||
}
|
||||
|
||||
void
|
||||
void
|
||||
muscle_insert (const char *key, const char *value)
|
||||
{
|
||||
muscle_entry_t *pair = XMALLOC (muscle_entry_t, 1);
|
||||
|
||||
@@ -57,6 +57,6 @@ extern struct option *longopts;
|
||||
extern const struct option_table_struct option_table[];
|
||||
|
||||
/* Set the longopts variable from option_table. */
|
||||
void create_long_option_table PARAMS (());
|
||||
void create_long_option_table PARAMS ((void));
|
||||
|
||||
#endif /* !OPTIONS_H_ */
|
||||
|
||||
@@ -966,7 +966,7 @@ parse_muscle_decl (void)
|
||||
|
||||
|
||||
/*---------------------------------.
|
||||
| Parse a double quoted parameter. |
|
||||
| Parse a double quoted parameter. |
|
||||
`---------------------------------*/
|
||||
|
||||
static const char *
|
||||
@@ -994,7 +994,7 @@ parse_dquoted_param (const char *from)
|
||||
else
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
obstack_1grow (¶m_obstack, '\0');
|
||||
param = obstack_finish (¶m_obstack);
|
||||
|
||||
@@ -1014,7 +1014,7 @@ parse_dquoted_param (const char *from)
|
||||
| Parse what comes after %skeleton. |
|
||||
`----------------------------------*/
|
||||
|
||||
void
|
||||
static void
|
||||
parse_skel_decl (void)
|
||||
{
|
||||
skeleton = parse_dquoted_param ("%skeleton");
|
||||
@@ -1133,7 +1133,6 @@ copy_action (symbol_list *rule, int stack_offset)
|
||||
{
|
||||
int c;
|
||||
int count;
|
||||
char buf[4096];
|
||||
|
||||
/* offset is always 0 if parser has already popped the stack pointer */
|
||||
if (semantic_parser)
|
||||
|
||||
Reference in New Issue
Block a user