diff options
author | Andrew Cagney <cagney@redhat.com> | 2002-06-17 21:45:55 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2002-06-17 21:45:55 +0000 |
commit | 871071e4abd0a9ff96028bc7d01a83fa27ca66d1 (patch) | |
tree | d0997cb9a24a24b6bbd8a01954ae253d753259e1 /sim | |
parent | 1a158c52aa6cd9b661ce1dd851558a6e529bb045 (diff) | |
download | gdb-871071e4abd0a9ff96028bc7d01a83fa27ca66d1.tar.gz |
* sim-memopt.c: Include <unistd.h>.
(do_memopt_add): Fix printf format.
* sim-events.c (sim_events_schedule): Initialize ``dummy''.
Diffstat (limited to 'sim')
-rw-r--r-- | sim/common/ChangeLog | 6 | ||||
-rw-r--r-- | sim/common/sim-events.c | 1 | ||||
-rw-r--r-- | sim/common/sim-memopt.c | 5 |
3 files changed, 11 insertions, 1 deletions
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index d3d21a62e2e..b7e13e3c55f 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,3 +1,9 @@ +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''. + 2002-06-16 Andrew Cagney <ac131313@redhat.com> * aclocal.m4 (SIM_AC_OPTION_WARNINGS): Update to match GDB's diff --git a/sim/common/sim-events.c b/sim/common/sim-events.c index 22531e3ece2..6cd75eaf509 100644 --- a/sim/common/sim-events.c +++ b/sim/common/sim-events.c @@ -481,6 +481,7 @@ sim_events_schedule (SIM_DESC sd, void *data) { va_list dummy; + memset (&dummy, 0, sizeof dummy); return sim_events_schedule_vtracef (sd, delta_time, handler, data, NULL, dummy); } diff --git a/sim/common/sim-memopt.c b/sim/common/sim-memopt.c index a8e9df65332..d66dc1ebad0 100644 --- a/sim/common/sim-memopt.c +++ b/sim/common/sim-memopt.c @@ -46,6 +46,9 @@ with this program; if not, write to the Free Software Foundation, Inc., #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 @@ do_memopt_add (SIM_DESC sd, { 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); |