Fix errors detected by -Wformat.

This commit is contained in:
John Polstra 1998-11-01 06:35:36 +00:00
parent eca7742c3c
commit 00bf1f3066
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=40803
3 changed files with 7 additions and 6 deletions

View File

@ -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);

View File

@ -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 <sys/param.h>
@ -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);

View File

@ -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);