From 119c2c7405afff79d7390d5bf72cead59e158cd1 Mon Sep 17 00:00:00 2001 From: ccoutant Date: Mon, 1 Dec 2008 19:50:48 +0000 Subject: [PATCH] gold/ChangeLog: * plugin.cc (ld_plugin_message): Change format parameter to const. Fix mismatch between new[] and delete. include/ChangeLog: * plugin-api.h (ld_plugin_message): Change format parameter to const. --- gold/ChangeLog | 5 +++++ gold/plugin.cc | 6 +++--- include/ChangeLog | 4 ++++ include/plugin-api.h | 2 +- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/gold/ChangeLog b/gold/ChangeLog index a83aeb36d0..da757f0910 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,8 @@ +2008-12-01 Cary Coutant + + * plugin.cc (ld_plugin_message): Change format parameter to const. + Fix mismatch between new[] and delete. + 2008-11-14 Cary Coutant * reloc.cc (Sized_relobj::do_read_relocs): Use constant invalid_address diff --git a/gold/plugin.cc b/gold/plugin.cc index a5f7a06f27..1b0eb01402 100644 --- a/gold/plugin.cc +++ b/gold/plugin.cc @@ -68,7 +68,7 @@ static enum ld_plugin_status add_input_file(char *pathname); static enum ld_plugin_status -message(int level, char *format, ...); +message(int level, const char *format, ...); }; @@ -194,7 +194,7 @@ Plugin::load() // Call the onload entry point. (*onload)(tv); - delete tv; + delete[] tv; #endif // ENABLE_PLUGINS } @@ -892,7 +892,7 @@ add_input_file(char *pathname) // Issue a diagnostic message from a plugin. static enum ld_plugin_status -message(int level, char * format, ...) +message(int level, const char * format, ...) { va_list args; va_start(args, format); diff --git a/include/ChangeLog b/include/ChangeLog index 1c162dc7e7..79bebbf748 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,5 +1,9 @@ 2008-12-01 Cary Coutant + * plugin-api.h (ld_plugin_message): Change format parameter to const. + +2008-12-01 Cary Coutant + * plugin-api.h: Fix syntax error when compiling with C++. 2008-11-26 Alan Modra diff --git a/include/plugin-api.h b/include/plugin-api.h index 3af486c5a1..a90fa23185 100644 --- a/include/plugin-api.h +++ b/include/plugin-api.h @@ -182,7 +182,7 @@ enum ld_plugin_status typedef enum ld_plugin_status -(*ld_plugin_message) (int level, char *format, ...); +(*ld_plugin_message) (int level, const char *format, ...); enum ld_plugin_level { -- 2.11.0