diff options
author | Pierre Muller <muller@sourceware.org> | 2009-10-01 21:33:24 +0000 |
---|---|---|
committer | Pierre Muller <muller@sourceware.org> | 2009-10-01 21:33:24 +0000 |
commit | c2d494a0190961d82c23b9e2fd120e16a150a767 (patch) | |
tree | 3e79fa65c21b47cc698a83ed6b6f34434c9b14ef /gdb | |
parent | 2f2da8f6fb6aeb4a624bae53099ea60ff9931172 (diff) | |
download | gdb-c2d494a0190961d82c23b9e2fd120e16a150a767.zip gdb-c2d494a0190961d82c23b9e2fd120e16a150a767.tar.gz gdb-c2d494a0190961d82c23b9e2fd120e16a150a767.tar.bz2 |
* src/gdb/testsuite/gdb.base/shr1.c: Use %p in format string.
* src/gdb/testsuite/gdb.base/unload.c: Avoid warning in fprintf.
* src/gdb/testsuite/gdb.base/watchpoint-solib.c: Idem.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/shr1.c | 2 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/unload.c | 7 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/watchpoint-solib.c | 7 |
4 files changed, 17 insertions, 5 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 1ab8411..2f4799e 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,11 @@ 2009-10-01 Pierre Muller <muller@ics.u-strasbg.fr> + * src/gdb/testsuite/gdb.base/shr1.c: Use %p in format string. + * src/gdb/testsuite/gdb.base/unload.c: Avoid warning in fprintf. + * src/gdb/testsuite/gdb.base/watchpoint-solib.c: Idem. + +2009-10-01 Pierre Muller <muller@ics.u-strasbg.fr> + * gdb.base/fileio.c (test_lseek): typecast ofs_t ret variable to long type. (test_unlink): Correct printf string. diff --git a/gdb/testsuite/gdb.base/shr1.c b/gdb/testsuite/gdb.base/shr1.c index a0257e4..117119a 100644 --- a/gdb/testsuite/gdb.base/shr1.c +++ b/gdb/testsuite/gdb.base/shr1.c @@ -25,7 +25,7 @@ int x; sg = 6.6; sgi++; sgs = 8; - printf("address of sgs is 0x%x\n", &sgs); + printf("address of sgs is %p\n", &sgs); return 2*x; } diff --git a/gdb/testsuite/gdb.base/unload.c b/gdb/testsuite/gdb.base/unload.c index a470849..b8434cd 100644 --- a/gdb/testsuite/gdb.base/unload.c +++ b/gdb/testsuite/gdb.base/unload.c @@ -27,7 +27,6 @@ # define dlsym(handle, func) GetProcAddress (handle, func) #endif #define dlclose(handle) FreeLibrary (handle) -#define dlerror() "error %d occurred", GetLastError () #else #include <dlfcn.h> #endif @@ -53,7 +52,11 @@ int main() if (!unloadshr) { - fprintf (stderr, dlerror ()); +#ifdef __WIN32__ + fprintf (stderr, "error %d occurred", GetLastError ()); +#else + fprintf (stderr, "%s", dlerror ()); +#endif exit (1); } diff --git a/gdb/testsuite/gdb.base/watchpoint-solib.c b/gdb/testsuite/gdb.base/watchpoint-solib.c index 86fc253..96cc4dc 100644 --- a/gdb/testsuite/gdb.base/watchpoint-solib.c +++ b/gdb/testsuite/gdb.base/watchpoint-solib.c @@ -27,7 +27,6 @@ # define dlsym(handle, func) GetProcAddress (handle, func) #endif #define dlclose(handle) FreeLibrary (handle) -#define dlerror() "error %d occurred", GetLastError () #else #include <dlfcn.h> #endif @@ -42,7 +41,11 @@ void open_shlib () if (!handle) { - fprintf (stderr, dlerror ()); +#ifdef __WIN32__ + fprintf (stderr, "error %d occurred", GetLastError ()); +#else + fprintf (stderr, "%s", dlerror ()); +#endif exit (1); } |