There are two uses of strrchr with const char * parameters in
lto-plugin.c where the result gets assigned to a non-const char *
variable.
Make the variable const char * so that we don't throw away const-ness.
I've seen clang produce warnings about this when compiling lto-plugin.c.
Regtested and bootstrapped on x86_64 linux.
lto-plugin/ChangeLog:
* lto-plugin.c (process_symtab): char *s -> const char *s.
(process_symtab_extension): Ditto.
Signed-off-by: Filip Kastl <fkastl@suse.cz>
process_symtab (void *data, const char *name, off_t offset, off_t length)
{
struct plugin_objfile *obj = (struct plugin_objfile *)data;
- char *s;
+ const char *s;
char *secdatastart, *secdata;
if (!startswith (name, ".gnu.lto_.symtab"))
off_t length)
{
struct plugin_objfile *obj = (struct plugin_objfile *)data;
- char *s;
+ const char *s;
char *secdatastart, *secdata;
if (!startswith (name, ".gnu.lto_.ext_symtab"))