This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH] Fix compilation warning in testsuite/gdb.base/unload.c
- From: Mark Kettenis <kettenis at chello dot nl>
- To: gdb-patches at sources dot redhat dot com
- Date: Sun, 15 Aug 2004 14:06:00 +0200 (CEST)
- Subject: [PATCH] Fix compilation warning in testsuite/gdb.base/unload.c
On my i386-unknown-freebsd4.7 system the prototype for dlerror() is
const char *dlerror (void);
This makes GCC issue a warning, which in turn makes the test fail.
The attached patch is obvious I think, so I committed it.
Tested on i386-unknown-freebsd4.7.
Mark
Index: ChangeLog
from Mark Kettenis <kettenis@gnu.org>
* gdb.base/unload.c (main): Make local variable msg const.
Index: gdb.base/unload.c
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/unload.c,v
retrieving revision 1.1
diff -u -p -r1.1 unload.c
--- gdb.base/unload.c 12 Aug 2004 20:22:59 -0000 1.1
+++ gdb.base/unload.c 15 Aug 2004 10:18:47 -0000
@@ -28,7 +28,7 @@ int main()
void *handle;
int (*unloadshr) (int);
int y;
- char *msg;
+ const char *msg;
handle = dlopen (SHLIB_NAME, RTLD_LAZY);
msg = dlerror ();