From 0ad104691f9438f9ebdedb8d13f45c113c9408bc Mon Sep 17 00:00:00 2001 From: jdp Date: Sun, 1 Nov 1998 06:35:36 +0000 Subject: Fix errors detected by -Wformat. --- usr.bin/gcore/aoutcore.c | 4 ++-- usr.bin/gcore/elfcore.c | 5 +++-- usr.bin/gcore/gcore.c | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) (limited to 'usr.bin/gcore') diff --git a/usr.bin/gcore/aoutcore.c b/usr.bin/gcore/aoutcore.c index b0d08f2..4702003 100644 --- a/usr.bin/gcore/aoutcore.c +++ b/usr.bin/gcore/aoutcore.c @@ -42,7 +42,7 @@ static const char copyright[] = static char sccsid[] = "@(#)gcore.c 8.2 (Berkeley) 9/23/93"; #endif static const char rcsid[] = - "$Id: gcore.c,v 1.11 1998/10/19 19:42:18 jdp Exp $"; + "$Id: gcore.c,v 1.12 1998/10/22 04:02:37 jdp Exp $"; #endif /* not lint */ /* @@ -178,7 +178,7 @@ main(argc, argv) if (exec.a_text != ptoa(ki->kp_eproc.e_vm.vm_tsize)) errx(1, "The executable %s does not belong to" " process %d!\n" - "Text segment size (in bytes): executable %d," + "Text segment size (in bytes): executable %ld," " process %d", binfile, pid, exec.a_text, ptoa(ki->kp_eproc.e_vm.vm_tsize)); data_offset = N_DATOFF(exec); diff --git a/usr.bin/gcore/elfcore.c b/usr.bin/gcore/elfcore.c index 1053841..af199ca 100644 --- a/usr.bin/gcore/elfcore.c +++ b/usr.bin/gcore/elfcore.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: elfcore.c,v 1.1 1998/10/19 19:42:18 jdp Exp $ */ #include @@ -142,7 +142,8 @@ elf_coredump(int fd, pid_t pid) err(1, "read from %s", memname); if (ngot < nwant) errx(1, "short read from %s:" - " wanted %d, got %d\n", nwant, ngot); + " wanted %d, got %d\n", memname, + nwant, ngot); ngot = write(fd, buf, nwant); if (ngot == -1) err(1, "write of segment %d failed", i); diff --git a/usr.bin/gcore/gcore.c b/usr.bin/gcore/gcore.c index b0d08f2..4702003 100644 --- a/usr.bin/gcore/gcore.c +++ b/usr.bin/gcore/gcore.c @@ -42,7 +42,7 @@ static const char copyright[] = static char sccsid[] = "@(#)gcore.c 8.2 (Berkeley) 9/23/93"; #endif static const char rcsid[] = - "$Id: gcore.c,v 1.11 1998/10/19 19:42:18 jdp Exp $"; + "$Id: gcore.c,v 1.12 1998/10/22 04:02:37 jdp Exp $"; #endif /* not lint */ /* @@ -178,7 +178,7 @@ main(argc, argv) if (exec.a_text != ptoa(ki->kp_eproc.e_vm.vm_tsize)) errx(1, "The executable %s does not belong to" " process %d!\n" - "Text segment size (in bytes): executable %d," + "Text segment size (in bytes): executable %ld," " process %d", binfile, pid, exec.a_text, ptoa(ki->kp_eproc.e_vm.vm_tsize)); data_offset = N_DATOFF(exec); -- cgit v1.1