From f8a8bc2ce4705444aa44c0c364d799dc501bf991 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Wed, 17 Feb 2010 22:55:40 +0000 Subject: * gdb.base/shmain.c (main): Remove printf call. * gdb.base/sizeof.c (main): Cast return of sizeof to int. * gdb.base/unload.c (main): Make format of fprintf a string literal. Add missing endlines to prints to stderr. * gdb.base/watchpoint-solib.c (open_shlib): Ditto. --- gdb/testsuite/ChangeLog | 8 ++++++++ gdb/testsuite/gdb.base/shmain.c | 1 - gdb/testsuite/gdb.base/sizeof.c | 24 ++++++++++++------------ gdb/testsuite/gdb.base/unload.c | 12 ++++++------ gdb/testsuite/gdb.base/watchpoint-solib.c | 6 +++--- 5 files changed, 29 insertions(+), 22 deletions(-) (limited to 'gdb') diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index c2827ef..e2594c6 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2010-02-17 Pedro Alves + + * gdb.base/shmain.c (main): Remove printf call. + * gdb.base/sizeof.c (main): Cast return of sizeof to int. + * gdb.base/unload.c (main): Make format of fprintf a string + literal. Add missing endlines to prints to stderr. + * gdb.base/watchpoint-solib.c (open_shlib): Ditto. + 2010-02-17 Tom Tromey * gdb.java/jprint.java (jprint.props): New field. diff --git a/gdb/testsuite/gdb.base/shmain.c b/gdb/testsuite/gdb.base/shmain.c index 7013db5..d2dc2f3 100644 --- a/gdb/testsuite/gdb.base/shmain.c +++ b/gdb/testsuite/gdb.base/shmain.c @@ -46,7 +46,6 @@ int main() g = shr2(g); g = mainshr1(g); sg = 1.1; - printf("address of sg is 0x%x\n", &sg); y.a = 3; y.b = 4; g = local_structarg(y); diff --git a/gdb/testsuite/gdb.base/sizeof.c b/gdb/testsuite/gdb.base/sizeof.c index c32231f..9c67c03 100644 --- a/gdb/testsuite/gdb.base/sizeof.c +++ b/gdb/testsuite/gdb.base/sizeof.c @@ -100,18 +100,18 @@ main () { fill_structs (); - printf ("sizeof (char) == %d\n", sizeof (char)); - printf ("sizeof (short) == %d\n", sizeof (short)); - printf ("sizeof (int) == %d\n", sizeof (int)); - printf ("sizeof (long) == %d\n", sizeof (long)); - printf ("sizeof (long long) == %d\n", sizeof (long long)); - - printf ("sizeof (void *) == %d\n", sizeof (void*)); - printf ("sizeof (void (*)(void)) == %d\n", sizeof (void (*)(void))); - - printf ("sizeof (float) == %d\n", sizeof (float)); - printf ("sizeof (double) == %d\n", sizeof (double)); - printf ("sizeof (long double) == %d\n", sizeof (long double)); + printf ("sizeof (char) == %d\n", (int) sizeof (char)); + printf ("sizeof (short) == %d\n", (int) sizeof (short)); + printf ("sizeof (int) == %d\n", (int) sizeof (int)); + printf ("sizeof (long) == %d\n", (int) sizeof (long)); + printf ("sizeof (long long) == %d\n", (int) sizeof (long long)); + + printf ("sizeof (void *) == %d\n", (int) sizeof (void*)); + printf ("sizeof (void (*)(void)) == %d\n", (int) sizeof (void (*)(void))); + + printf ("sizeof (float) == %d\n", (int) sizeof (float)); + printf ("sizeof (double) == %d\n", (int) sizeof (double)); + printf ("sizeof (long double) == %d\n", (int) sizeof (long double)); /* Signed char? */ printf ("valueof ('\\377') == %d\n", '\377'); diff --git a/gdb/testsuite/gdb.base/unload.c b/gdb/testsuite/gdb.base/unload.c index 51a4a05..b58085c 100644 --- a/gdb/testsuite/gdb.base/unload.c +++ b/gdb/testsuite/gdb.base/unload.c @@ -44,7 +44,7 @@ int main() if (!handle) { - fprintf (stderr, dlerror ()); + fprintf (stderr, "%s\n", dlerror ()); exit (1); } @@ -53,9 +53,9 @@ int main() if (!unloadshr) { #ifdef __WIN32__ - fprintf (stderr, "error %d occurred", GetLastError ()); + fprintf (stderr, "error %d occurred\n", GetLastError ()); #else - fprintf (stderr, "%s", dlerror ()); + fprintf (stderr, "%s\n", dlerror ()); #endif exit (1); } @@ -71,7 +71,7 @@ int main() if (!handle) { - fprintf (stderr, dlerror ()); + fprintf (stderr, "%s\n", dlerror ()); exit (1); } @@ -80,9 +80,9 @@ int main() if (!unloadshr) { #ifdef __WIN32__ - fprintf (stderr, "error %d occurred", GetLastError ()); + fprintf (stderr, "error %d occurred\n", GetLastError ()); #else - fprintf (stderr, "%s", dlerror ()); + fprintf (stderr, "%s\n", dlerror ()); #endif exit (1); } diff --git a/gdb/testsuite/gdb.base/watchpoint-solib.c b/gdb/testsuite/gdb.base/watchpoint-solib.c index 0269528..7a39c96 100644 --- a/gdb/testsuite/gdb.base/watchpoint-solib.c +++ b/gdb/testsuite/gdb.base/watchpoint-solib.c @@ -42,9 +42,9 @@ void open_shlib () if (!handle) { #ifdef __WIN32__ - fprintf (stderr, "error %d occurred", GetLastError ()); + fprintf (stderr, "error %d occurred\n", GetLastError ()); #else - fprintf (stderr, "%s", dlerror ()); + fprintf (stderr, "%s\n", dlerror ()); #endif exit (1); } @@ -53,7 +53,7 @@ void open_shlib () if (!foo) { - fprintf (stderr, dlerror ()); + fprintf (stderr, "%s\n", dlerror ()); exit (1); } -- cgit v1.1