This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

One more tweak to fix compile warnings causing untested tests


I'm seeing this with ubuntu 9.10's gcc:

 ../../../src/gdb/testsuite/gdb.base/solib-disc.c: In function 'main':
 ../../../src/gdb/testsuite/gdb.base/solib-disc.c:39: warning: format not a string literal and no format arguments
 ../../../src/gdb/testsuite/gdb.base/solib-disc.c:46: warning: format not a string literal and no format arguments

 gdb compile failed, ../../../src/gdb/testsuite/gdb.base/solib-disc.c: In function 'main':

I fixed similar issues last month, but missed this one
because this test is skipped on a native configuration; I'm
now testing with gdbserver.

Applied.

-- 
Pedro Alves

2010-03-14  Pedro Alves  <pedro@codesourcery.com>

	gdb/testsuite/
	* gdb.base/solib-disc.c (main): Make format of fprintf a string
	literal.  Add missing endlines to prints to stderr.

---
 gdb/testsuite/gdb.base/solib-disc.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: src/gdb/testsuite/gdb.base/solib-disc.c
===================================================================
--- src.orig/gdb/testsuite/gdb.base/solib-disc.c	2010-03-14 17:41:34.000000000 +0000
+++ src/gdb/testsuite/gdb.base/solib-disc.c	2010-03-14 17:42:18.000000000 +0000
@@ -36,14 +36,14 @@ int main()
   handle = dlopen (SHLIB_NAME, RTLD_LAZY);
   if (!handle)
     {
-      fprintf (stderr, dlerror ());
+      fprintf (stderr, "%s\n", dlerror ());
       exit (1);
     }
 
   func = (void (*)(void)) dlsym (handle, "shrfunc");
   if (!func)
     {
-      fprintf (stderr, dlerror ());
+      fprintf (stderr, "%s\n", dlerror ());
       exit (1);
     }
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]