aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.base')
-rw-r--r--gdb/testsuite/gdb.base/shmain.c1
-rw-r--r--gdb/testsuite/gdb.base/sizeof.c24
-rw-r--r--gdb/testsuite/gdb.base/unload.c12
-rw-r--r--gdb/testsuite/gdb.base/watchpoint-solib.c6
4 files changed, 21 insertions, 22 deletions
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);
}