This is the mail archive of the gdb-patches@sources.redhat.com 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]

[patch sim/common] -Werror tweaks


FYI,

Some -Werror tweaks for sim/common.

Committed,
Andrew
2002-06-17  Andrew Cagney  <cagney@redhat.com>

	* sim-memopt.c: Include <unistd.h>.
	(do_memopt_add): Fix printf format.

	* sim-events.c (sim_events_schedule): Initialize ``dummy''.

Index: sim-events.c
===================================================================
RCS file: /cvs/src/src/sim/common/sim-events.c,v
retrieving revision 1.4
diff -u -r1.4 sim-events.c
--- sim-events.c	10 Feb 2002 23:11:37 -0000	1.4
+++ sim-events.c	17 Jun 2002 21:44:38 -0000
@@ -481,6 +481,7 @@
 		     void *data)
 {
   va_list dummy;
+  memset (&dummy, 0, sizeof dummy);
   return sim_events_schedule_vtracef (sd, delta_time, handler, data,
 				      NULL, dummy);
 }
Index: sim-memopt.c
===================================================================
RCS file: /cvs/src/src/sim/common/sim-memopt.c,v
retrieving revision 1.2
diff -u -r1.2 sim-memopt.c
--- sim-memopt.c	20 Mar 2001 17:13:39 -0000	1.2
+++ sim-memopt.c	17 Jun 2002 21:44:39 -0000
@@ -46,6 +46,9 @@
 #ifdef HAVE_SYS_STAT_H
 #include <sys/stat.h>
 #endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
 
 /* Memory fill byte. */
 static unsigned8 fill_byte_value;
@@ -167,7 +170,7 @@
 	    {
 	      sim_io_error (sd,
 			    "Error, cannot confirm that mmap file is large enough "
-			    "(>= %d bytes)\n", bytes);
+			    "(>= %ld bytes)\n", bytes);
 	    }
 
 	  free_buffer = mmap (0, bytes, PROT_READ|PROT_WRITE, MAP_SHARED, mmap_next_fd, 0);

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