This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Fix ld testsuite failures
* Martin Michlmayr <tbm@cyrius.com> [2006-05-16 00:37]:
> gcc -B/home/tbm/src/binutils/ld/tmpdir/gas/ -I/home/tbm/src/binutils/ld/testsuite/ld-cdtest -g -O2
> -fno-exceptions -c /home/tbm/src/binutils/ld/testsuite/ld-cdtest/cdtest-bar.cc -o tmpdir/cdtest-bar.
> o
> /home/tbm/src/binutils/ld/testsuite/ld-cdtest/cdtest-bar.cc:5: warning: deprecated conversion from string constant to 'char*''
...
> ERROR: /home/tbm/src/binutils/ld/testsuite/ld-cdtest/cdtest-bar.cc: compilation failed
> Error/Warning threshold exceeded: 1 0 (max. 1 3)
2006-05-16 Martin Michlmayr <tbm@cyrius.com>
* ld-cdtest/cdtest-bar.cc: Use casts to eliminate compiler warnings.
(g): Likewise.
* ld-cdtest/cdtest-main.cc: Likewise.
(main): Likewise.
* ld-srec/sr3.cc: Likewise.
(main): Likewise.
--- ld/testsuite/ld-cdtest/cdtest-bar.cc~ 2006-05-15 22:03:56.000000000 +0000
+++ ld/testsuite/ld-cdtest/cdtest-bar.cc 2006-05-15 22:23:51.000000000 +0000
@@ -2,7 +2,7 @@
#include "cdtest-foo.h"
-static Foo static_foo( "static_foo");
+static Foo static_foo((char *)"static_foo");
Foo f()
{
@@ -12,6 +12,6 @@
void g()
{
- Foo other_foo1 = Foo( "other_foo1"), other_foo2 = Foo( "other_foo2");
+ Foo other_foo1 = Foo((char *)"other_foo1"), other_foo2 = Foo((char *)"other_foo2");
other_foo2 = other_foo1;
}
--- ld/testsuite/ld-cdtest/cdtest-main.cc~ 2006-05-15 22:17:11.000000000 +0000
+++ ld/testsuite/ld-cdtest/cdtest-main.cc 2006-05-15 22:17:30.000000000 +0000
@@ -25,12 +25,12 @@
Foo::init_foo();
}
-static Foo static_foo( "static_foo");
+static Foo static_foo((char *)"static_foo");
int main()
{
assert (Foo::nb_foos() == 2);
- Foo automatic_foo( "automatic_foo");
+ Foo automatic_foo((char *)"automatic_foo");
Foo bla_foo = f();
assert (Foo::nb_foos() == 4);
g();
--- ld/testsuite/ld-srec/sr3.cc~ 2006-05-15 22:11:17.000000000 +0000
+++ ld/testsuite/ld-srec/sr3.cc 2006-05-15 22:11:40.000000000 +0000
@@ -17,12 +17,12 @@
~Foo ();
};
-static Foo static_foo( "static_foo");
+static Foo static_foo((char *)"static_foo");
int
main ()
{
- Foo automatic_foo( "automatic_foo");
+ Foo automatic_foo((char *)"automatic_foo");
return 0;
}
--
Martin Michlmayr
http://www.cyrius.com/